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:
wp_xxyyzz
2021-12-04 12:06:23 +00:00
parent c5bac93f80
commit 2757d26671
5 changed files with 36 additions and 7 deletions

View File

@ -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>

View 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.

View File

@ -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;

View File

@ -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;

View File

@ -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;