You've already forked lazarus-ccr
tvplanit: Add TCustomFileDatastore as common ancestor of the file based xml, ini, and json datastores.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8167 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -32,7 +32,7 @@ Portions created by TurboPower Software Inc. are Copyright (C) 2002 TurboPower S
|
|||||||
|
|
||||||
Contributor(s): "/>
|
Contributor(s): "/>
|
||||||
<Version Major="1" Minor="5"/>
|
<Version Major="1" Minor="5"/>
|
||||||
<Files Count="74">
|
<Files Count="75">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="source\vpbase.pas"/>
|
<Filename Value="source\vpbase.pas"/>
|
||||||
<UnitName Value="VpBase"/>
|
<UnitName Value="VpBase"/>
|
||||||
@ -329,6 +329,10 @@ Contributor(s): "/>
|
|||||||
<Filename Value="source\vpical.pas"/>
|
<Filename Value="source\vpical.pas"/>
|
||||||
<UnitName Value="VpICAL"/>
|
<UnitName Value="VpICAL"/>
|
||||||
</Item74>
|
</Item74>
|
||||||
|
<Item75>
|
||||||
|
<Filename Value="source\vpfileds.pas"/>
|
||||||
|
<UnitName Value="VpFileDS"/>
|
||||||
|
</Item75>
|
||||||
</Files>
|
</Files>
|
||||||
<CompatibilityMode Value="True"/>
|
<CompatibilityMode Value="True"/>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
25
components/tvplanit/source/vpfileds.pas
Normal file
25
components/tvplanit/source/vpfileds.pas
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ Basic Visual PlanIt datastore using an flat files, such as ini, xml or json }
|
||||||
|
|
||||||
|
{$IF FPC_FullVersion >= 30200}
|
||||||
|
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
|
||||||
|
{$IFEND}
|
||||||
|
|
||||||
|
{$I Vp.INC}
|
||||||
|
|
||||||
|
unit VpFileDS;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
VpBase, VpData, VpBaseDS;
|
||||||
|
|
||||||
|
type
|
||||||
|
TVpCustomFileDataStore = class(TVpCustomDataStore)
|
||||||
|
private
|
||||||
|
protected
|
||||||
|
public
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
end.
|
@ -8,12 +8,12 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes,
|
SysUtils, Classes,
|
||||||
VpData, VpBaseDS;
|
VpData, VpBaseDS, VpFileDS;
|
||||||
|
|
||||||
type
|
type
|
||||||
TVpIniVersion = (iv105, iv104);
|
TVpIniVersion = (iv105, iv104);
|
||||||
|
|
||||||
TVpIniDatastore = class(TVpCustomDatastore)
|
TVpIniDatastore = class(TVpCustomFileDatastore)
|
||||||
private
|
private
|
||||||
FFilename: String;
|
FFilename: String;
|
||||||
FFormatSettings: TFormatSettings;
|
FFormatSettings: TFormatSettings;
|
||||||
|
@ -8,12 +8,12 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, fpjson,
|
SysUtils, Classes, fpjson,
|
||||||
VpData, VpBaseDS;
|
VpData, VpBaseDS, VpFileDS;
|
||||||
|
|
||||||
type
|
type
|
||||||
TVpJSONStoreType = (jstFile, jstString);
|
TVpJSONStoreType = (jstFile, jstString);
|
||||||
|
|
||||||
TVpJSONDataStore = class(TVpCustomDataStore)
|
TVpJSONDataStore = class(TVpCustomFileDataStore)
|
||||||
private
|
private
|
||||||
FFileName: String;
|
FFileName: String;
|
||||||
FJSONString: String;
|
FJSONString: String;
|
||||||
|
@ -8,10 +8,10 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, laz2_xmlread, laz2_xmlwrite, laz2_DOM,
|
SysUtils, Classes, laz2_xmlread, laz2_xmlwrite, laz2_DOM,
|
||||||
VpData, VpBaseDS;
|
VpData, VpBaseDS, VpFileDS;
|
||||||
|
|
||||||
type
|
type
|
||||||
TVpXmlDatastore = class(TVpCustomDatastore)
|
TVpXmlDatastore = class(TVpCustomFileDatastore)
|
||||||
private
|
private
|
||||||
FFilename: String;
|
FFilename: String;
|
||||||
FParentNode: String;
|
FParentNode: String;
|
||||||
|
Reference in New Issue
Block a user