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): "/>
|
||||
<Version Major="1" Minor="5"/>
|
||||
<Files Count="74">
|
||||
<Files Count="75">
|
||||
<Item1>
|
||||
<Filename Value="source\vpbase.pas"/>
|
||||
<UnitName Value="VpBase"/>
|
||||
@ -329,6 +329,10 @@ Contributor(s): "/>
|
||||
<Filename Value="source\vpical.pas"/>
|
||||
<UnitName Value="VpICAL"/>
|
||||
</Item74>
|
||||
<Item75>
|
||||
<Filename Value="source\vpfileds.pas"/>
|
||||
<UnitName Value="VpFileDS"/>
|
||||
</Item75>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<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
|
||||
SysUtils, Classes,
|
||||
VpData, VpBaseDS;
|
||||
VpData, VpBaseDS, VpFileDS;
|
||||
|
||||
type
|
||||
TVpIniVersion = (iv105, iv104);
|
||||
|
||||
TVpIniDatastore = class(TVpCustomDatastore)
|
||||
TVpIniDatastore = class(TVpCustomFileDatastore)
|
||||
private
|
||||
FFilename: String;
|
||||
FFormatSettings: TFormatSettings;
|
||||
|
@ -8,12 +8,12 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, fpjson,
|
||||
VpData, VpBaseDS;
|
||||
VpData, VpBaseDS, VpFileDS;
|
||||
|
||||
type
|
||||
TVpJSONStoreType = (jstFile, jstString);
|
||||
|
||||
TVpJSONDataStore = class(TVpCustomDataStore)
|
||||
TVpJSONDataStore = class(TVpCustomFileDataStore)
|
||||
private
|
||||
FFileName: String;
|
||||
FJSONString: String;
|
||||
|
@ -8,10 +8,10 @@ interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, laz2_xmlread, laz2_xmlwrite, laz2_DOM,
|
||||
VpData, VpBaseDS;
|
||||
VpData, VpBaseDS, VpFileDS;
|
||||
|
||||
type
|
||||
TVpXmlDatastore = class(TVpCustomDatastore)
|
||||
TVpXmlDatastore = class(TVpCustomFileDatastore)
|
||||
private
|
||||
FFilename: String;
|
||||
FParentNode: String;
|
||||
|
Reference in New Issue
Block a user