Class TxdkSnippet (unit XDKSnips) |
Inherits from
TComponent
constructor Create(AOwner:TComponent);
- ==================================================================== ==================================================================== TxdkSnippet
destructor Destroy;
procedure DoResultCode;
analize code and fill list of params working with result code snippet } // DoResultCode analize code template and replace all params to corresponding values // sorry, this method is working properly, but not optimized .
procedure ExtractParams;
analize code and replace params to corresponding values in FResultCode; **you need explicit call DoResultCode** in your methods before getting result code.
function ParamsCount:integer;
function ResultCode:TStrings;
function ResultCodeStream:TStream;
create new TMemoryStream - you need free it after using!
function ResultCodeText:string;
function GetCodeStream:TStream;
function GetCodeText:string;
function GetParamValue(const ParamName:string):string;
procedure SetCode(Value:TStrings);
working with code template - 'snippet'
procedure SetCodeStream(Value:TStream);
procedure SetCodeText(Value:string);
procedure SetParams(Value:TStrings);
create new stream; you need free it after using! working with params (and values)
procedure SetParamValue(const ParamName:string; const Value:string);
property Code : TStrings
property ParamBracket : char
property CodeStream : TStream
create new TMemoryStream - you need free it after using!
property CodeText : string
property Params : TStrings
property ParamValues : string
FCode : TStrings;
FParamBracket : char;
FParams : TStrings;
FResultCode : TSTrings;
constructor Create(AOwner:TComponent);
==================================================================== ==================================================================== TxdkSnippet
destructor Destroy;
procedure DoResultCode;
analize code and fill list of params
working with result code snippet } // DoResultCode analize code template and replace all params to corresponding values // sorry, this method is working properly, but not optimized ... :(
procedure ExtractParams;
analize code and replace params to corresponding values in FResultCode; **you need explicit call DoResultCode** in your methods before getting result code.
ExtractParams analize code template and fill list of params (each param in list is unique
function ParamsCount:integer;
function ResultCode:TStrings;
function ResultCodeStream:TStream;
create new TMemoryStream - you need free it after using!
function ResultCodeText:string;
function GetCodeStream:TStream;
function GetCodeText:string;
function GetParamValue(const ParamName:string):string;
procedure SetCode(Value:TStrings);
working with code template - 'snippet'
procedure SetCodeStream(Value:TStream);
procedure SetCodeText(Value:string);
procedure SetParams(Value:TStrings);
create new stream; you need free it after using!
working with params (and values)
procedure SetParamValue(const ParamName:string; const Value:string);
property Code : TStrings
property ParamBracket : char
property CodeStream : TStream
create new TMemoryStream - you need free it after using!
property CodeText : string
property Params : TStrings
property ParamValues : string
FCode : TStrings;
FParamBracket : char;
FParams : TStrings;
FResultCode : TSTrings;