1 {
2 ***************************************************************************
3 * *
4 * This source is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This code is distributed in the hope that it will be useful, but *
10 * WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * General Public License for more details. *
13 * *
14 * A copy of the GNU General Public License is available on the World *
15 * Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
16 * obtain it by writing to the Free Software Foundation, *
17 * Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA. *
18 * *
19 ***************************************************************************
20 }
21 unit ProjPackIntf;
22
23 {$mode objfpc}{$H+}
24
25 interface
26
27 uses
28 Classes, SysUtils,
29 // BuildIntf
30 IDEOptionsIntf, CompOptsIntf;
31
32 type
33
34 {$M+}
35 TIDEOwnedFile = class
36 protected
37 FUnitName: string;
GetFilenamenull38 function GetFilename: string; virtual; abstract;
39 procedure SetFilename(const AValue: string); virtual; abstract;
40 procedure SetUnitName(const AValue: string); virtual; abstract;
41 public
GetFullFilenamenull42 function GetFullFilename: string; virtual; abstract; // if no path, the file was not saved yet
GetShortFilenamenull43 function GetShortFilename(UseUp: boolean): string; virtual; abstract;
GetFileOwnernull44 function GetFileOwner: TObject; virtual; abstract;
GetFileOwnerNamenull45 function GetFileOwnerName: string; virtual; abstract;
46 property Filename: string read GetFilename write SetFilename;
47 property Unit_Name: string read FUnitName write SetUnitName;
48 end;
49 {$M-}
50
51 { TIDEProjPackBase }
52
53 TIDEProjPackBase = class(TComponent)
54 private
55 protected
56 FIDEOptions: TAbstractIDEOptions; //actually TProjectIDEOptions or TPackageIDEOptions;
57 FLazCompilerOptions: TLazCompilerOptions;
GetDirectorynull58 function GetDirectory: string; virtual; abstract;
59 //procedure SetDirectory(AValue: string); virtual; abstract;
HasDirectorynull60 function HasDirectory: boolean; virtual;
GetLazCompilerOptionsnull61 function GetLazCompilerOptions: TLazCompilerOptions;
62 public
63 property Directory: string read GetDirectory;// write SetDirectory; // directory of .lpi or .lpk file
64 property LazCompilerOptions: TLazCompilerOptions read GetLazCompilerOptions;
65 end;
66
67
68 implementation
69
70 { TIDEProjPackBase }
71
TIDEProjPackBase.HasDirectorynull72 function TIDEProjPackBase.HasDirectory: boolean;
73 begin
74 Result := True;
75 end;
76
GetLazCompilerOptionsnull77 function TIDEProjPackBase.GetLazCompilerOptions: TLazCompilerOptions;
78 begin
79 Result := FLazCompilerOptions;
80 end;
81
82 end.
83
84