I tried.
unit Classesh_imp;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils,
base_engine, titanscripter;
procedure RegisterTotalFor_Classesh;
implementation
var H, G:Integer;
GoR,GoW: TTitanMethodDefinition;
function TStrings_GetLBS:TTextLineBreakStyle;
begin result:= TStrings(_Self).TextLineBreakStyle; end;
procedure TStrings_SetLBS(Value: TTextLineBreakStyle);
begin TStrings(_Self).TextLineBreakStyle:= Value; end;
function TStrings_GetDelimiter: Char;
begin result:= TStrings(_Self).Delimiter; end;
procedure TStrings_SetDelimiter(Value: Char);
begin TStrings(_Self).Delimiter:= Value; end;
function TStrings_GetDelimitedText: String;
begin result:= TStrings(_Self).DelimitedText; end;
procedure TStrings_SetDelimitedText(Value: String);
begin TStrings(_Self).DelimitedText:= Value; end;
function TStrings_GetLineBreak: String;
begin result:= TStrings(_Self).LineBreak; end;
procedure TStrings_SetLineBreak(Value: String);
begin TStrings(_Self).LineBreak:= Value; end;
function TStrings_GetStrictDelimiter: Boolean;
begin result:= TStrings(_Self).StrictDelimiter; end;
procedure TStrings_SetStrictDelimiter(Value: Boolean);
begin TStrings(_Self).StrictDelimiter:= Value; end;
function TStrings_GetQuoteChar: Char;
begin result:= TStrings(_Self).QuoteChar; end;
procedure TStrings_SetQuoteChar(Value: Char);
begin TStrings(_Self).QuoteChar:= Value; end;
function TStrings_GetNameValueSeparator: Char;
begin result:= TStrings(_Self).NameValueSeparator; end;
procedure TStrings_SetNameValueSeparator(Value: Char);
begin TStrings(_Self).NameValueSeparator:= Value; end;
function TStrings_GetValueFromIndex(Index: Integer): String;
begin result:= TStrings(_Self).ValueFromIndex[Index]; end;
procedure TStrings_SetValueFromIndex(Value: String; Index: Integer);
begin TStrings(_Self).ValueFromIndex[Index]:= Value; end;
function TStrings_GetCapacity: Integer;
begin result:= TStrings(_Self).Capacity; end;
procedure TStrings_SetCapacity(Value: Integer);
begin TStrings(_Self).Capacity:= Value; end;
function TStrings_GetCommaText: String;
begin result:= TStrings(_Self).CommaText; end;
procedure TStrings_SetCommaText(Value: String);
begin TStrings(_Self).CommaText:= Value; end;
function TStrings_GetCount: Integer;
begin result:= TStrings(_Self).Count; end;
function TStrings_GetNames(Index: Integer): String;
begin result:= TStrings(_Self).Names[Index]; end;
function TStrings_GetObjects(Index: Integer): TObject;
begin result:= TStrings(_Self).Objects[Index]; end;
procedure TStrings_SetObjects(Value: TObject; Index: Integer);
begin TStrings(_Self).Objects[Index]:= Value; end;
function TStrings_GetValues(const Name: string): String;
begin result:= TStrings(_Self).Values[Name]; end;
procedure TStrings_SetValues(Value: String; const name: string);
begin TStrings(_Self).Values[Name]:= Value; end;
function TStrings_GetStrings(Index: Integer): String;
begin result:= TStrings(_Self).Strings[Index]; end;
procedure TStrings_SetStrings(Value: String; Index: Integer);
begin TStrings(_Self).Strings[Index]:= Value; end;
function TStrings_GetText: String;
begin result:= TStrings(_Self).Text; end;
procedure TStrings_SetText(Value: String);
begin TStrings(_Self).Text:= Value; end;
function TStrings_GetStringsAdapter: IStringsAdapter;
begin result:= TStrings(_Self).StringsAdapter; end;
procedure TStrings_SetStringsAdapter(Value: IStringsAdapter);
begin TStrings(_Self).StringsAdapter:= Value; end;
{TStringsList}
function TStringList_GetDuplicates: TDuplicates;
begin result:= TStringList(_Self).Duplicates; end;
procedure TStringList_SetDuplicates(Value: TDuplicates);
begin TStringList(_Self).Duplicates:= Value; end;
function TStringList_GetSorted: Boolean;
begin result:= TStringList(_Self).Sorted; end;
procedure TStringList_SetSorted(Value: Boolean);
begin TStringList(_Self).Sorted:= Value; end;
function TStringList_GetCaseSensitive: Boolean;
begin result:= TStringList(_Self).CaseSensitive; end;
procedure TStringList_SetCaseSensitive(Value: Boolean);
begin TStringList(_Self).CaseSensitive:= Value; end;
function TStringList_GetOnChange: TNotifyEvent;
begin result:= TStringList(_Self).OnChange; end;
procedure TStringList_SetOnChange(Value: TNotifyEvent);
begin TStringList(_Self).OnChange:= Value; end;
function TStringList_GetOnChanging: TNotifyEvent;
begin result:= TStringList(_Self).OnChanging; end;
procedure TStringList_SetOnChanging(Value: TNotifyEvent);
begin TStringList(_Self).OnChanging:= Value; end;
function TStringList_GetOwnsObjects: Boolean;
begin result:= TStringList(_Self).OwnsObjects; end;
procedure TStringList_SetOwnsObjects(Value: boolean);
begin TStringList(_Self).OwnsObjects:= Value; end;
procedure _RegCIOs0;
Begin
{TPersistent}
G:=RegisterClassTypeSX(TPersistent);
RegisterMethodSX(G,'Destructor Destroy; override;', @TPersistent.Destroy);
RegisterMethodSX(G,'procedure Assign(Source: TPersistent); virtual;', @TPersistent.Assign);
RegisterMethodSX(G,'Procedure FPOAttachObserver(AObserver : TObject);', @TPersistent.FPOAttachObserver);
RegisterMethodSX(G,'Procedure FPODetachObserver(AObserver : TObject);', @TPersistent.FPODetachObserver);
RegisterMethodSX(G,'Procedure FPONotifyObservers(ASender : TObject; AOperation : TFPObservedOperation; Data : Pointer);', @TPersistent.FPONotifyObservers);
RegisterMethodSX(G,'function GetNamePath: string; virtual; {dynamic;}', @TPersistent.GetNamePath);
{TStrings}
G:=RegisterClassTypeSX(TStrings);
RegisterMethodSX(G,'destructor Destroy; override;', @TStrings.Destroy);
RegisterMethodSX(G,'function Add(const S: string): Integer; virtual; overload;', @TStrings.Add);
RegisterMethodSX(G,'function AddObject(const S: string; AObject: TObject): Integer; virtual; overload;', @TStrings.AddObject);
RegisterMethodSX(G,'function Add(const Fmt : string; const Args : Array of const): Integer; overload;', @TStrings.Add);
RegisterMethodSX(G,'function AddObject(const Fmt: string; Args : Array of const; AObject: TObject): Integer; overload;', @TStrings.AddObject);
RegisterMethodSX(G,'procedure Append(const S: string);', @TStrings.Append);
RegisterMethodSX(G,'procedure AddStrings(TheStrings: TStrings); overload; virtual;', @TStrings.AddStrings);
RegisterMethodSX(G,'procedure AddStrings(const TheStrings: array of string); overload; virtual;', @TStrings.AddStrings);
RegisterMethodSX(G,'Procedure AddText(Const S : String); virtual;', @TStrings.AddText);
RegisterMethodSX(G,'procedure Assign(Source: TPersistent); override;', @TStrings.Assign);
RegisterMethodSX(G,'procedure BeginUpdate;', @TStrings.BeginUpdate);
RegisterMethodSX(G,'procedure Clear; virtual; abstract;', @TStrings.Clear);
RegisterMethodSX(G,'procedure Delete(Index: Integer); virtual; abstract;', @TStrings.Delete);
RegisterMethodSX(G,'procedure EndUpdate;', @TStrings.EndUpdate);
RegisterMethodSX(G,'function Equals(Obj: TObject): Boolean; override; overload;', @TStrings.Equals);
RegisterMethodSX(G,'function Equals(TheStrings: TStrings): Boolean; overload;', @TStrings.Equals);
RegisterMethodSX(G,'procedure Exchange(Index1, Index2: Integer); virtual;', @TStrings.Exchange);
RegisterMethodSX(G,'function GetEnumerator: TStringsEnumerator;', @TStrings.GetEnumerator);
RegisterMethodSX(G,'function GetText: PChar; virtual;', @TStrings.GetText);
RegisterMethodSX(G,'function IndexOf(const S: string): Integer; virtual;', @TStrings.IndexOf);
RegisterMethodSX(G,'function IndexOfName(const Name: string): Integer; virtual;', @TStrings.IndexOfName);
RegisterMethodSX(G,'function IndexOfObject(AObject: TObject): Integer; virtual;', @TStrings.IndexOfObject);
RegisterMethodSX(G,'procedure Insert(Index: Integer; const S: string); virtual; abstract;', @TStrings.Insert);
RegisterMethodSX(G,'procedure InsertObject(Index: Integer; const S: string; AObject: TObject);', @TStrings.InsertObject);
RegisterMethodSX(G,'procedure LoadFromFile(const FileName: string); virtual;', @TStrings.LoadFromFile);
RegisterMethodSX(G,'procedure LoadFromStream(Stream: TStream); virtual;', @TStrings.LoadFromStream);
RegisterMethodSX(G,'procedure Move(CurIndex, NewIndex: Integer); virtual;', @TStrings.Move);
RegisterMethodSX(G,'procedure SaveToFile(const FileName: string); virtual;', @TStrings.SaveToFile);
RegisterMethodSX(G,'procedure SaveToStream(Stream: TStream); virtual;', @TStrings.SaveToStream);
RegisterMethodSX(G,'procedure SetText(TheText: PChar); virtual;', @TStrings.SetText);
RegisterMethodSX(G,'procedure GetNameValue(Index : Integer; Out AName,AValue : String);', @TStrings.GetNameValue);
RegisterMethodSX(G,'function ExtractName(Const S:String):String;', @TStrings.ExtractName);
GoR:=RegisterMethodSXF(G,'function _GetLBS: TTextLineBreakStyle;',@TStrings_GetLBS );
GoW:=RegisterMethodSXF(G,'procedure _SetOnChange(Value: TTextLineBreakStyle);',@TStrings_SetLBS);
RegisterPropertySX(G,GoR,GoW,'TextLineBreakStyle','TTextLineBreakStyle');
GoR:=RegisterMethodSXF(G,'function _GetDelimiter:Char;',@TStrings_GetDelimiter );
GoW:=RegisterMethodSXF(G,'procedure _SetDelimiter(Value: Char);',@TStrings_SetDelimiter);
RegisterPropertySX(G,GoR,GoW,'Delimiter','Char');
GoR:=RegisterMethodSXF(G,'function _GetDelimitedText: String;',@TStrings_GetDelimitedText );
GoW:=RegisterMethodSXF(G,'procedure _SetDelimitedText(Value: String);',@TStrings_SetDelimitedText);
RegisterPropertySX(G,GoR,GoW,'DelimitedText','String');
GoR:=RegisterMethodSXF(G,'function _GetLineBreak: String;',@TStrings_GetLineBreak );
GoW:=RegisterMethodSXF(G,'procedure _SetLineBreak(Value: String);',@TStrings_SetLineBreak);
RegisterPropertySX(G,GoR,GoW,'LineBreak','String');
GoR:=RegisterMethodSXF(G,'function _GetStrictDelimiter: Boolean;',@TStrings_GetStrictDelimiter);
GoW:=RegisterMethodSXF(G,'procedure _SetStrictDelimiter(Value: Boolean);',@TStrings_SetStrictDelimiter);
RegisterPropertySX(G,GoR,GoW,'StrictDelimiter','Boolean');
GoR:=RegisterMethodSXF(G,'function _GetQuoteChar: Char;',@TStrings_GetQuoteChar);
GoW:=RegisterMethodSXF(G,'procedure _SetQuoteChar(Value: char);',@TStrings_SetQuoteChar);
RegisterPropertySX(G,GoR,GoW,'QuoteChar','Char');
GoR:=RegisterMethodSXF(G,'function _GetNameValueSeparator: Char;',@TStrings_GetNameValueSeparator);
GoW:=RegisterMethodSXF(G,'procedure _SetNameValueSeparator(Value: char);',@TStrings_SetNameValueSeparator);
RegisterPropertySX(G,GoR,GoW,'NameValueSeparator','Char');
GoR:=RegisterMethodSXF(G,'function _GetValueFromIndex(Index: Integer): String;',@TStrings_GetValueFromIndex);
GoW:=RegisterMethodSXF(G,'procedure _SetValueFromIndex(Value: char; Index: Integer);',@TStrings_SetValueFromIndex);
RegisterPropertySX(G,GoR,GoW,'ValueFromIndex[Index: Integer]','String');
GoR:=RegisterMethodSXF(G,'function _GetCapacity: Integer;',@TStrings_GetCapacity);
GoW:=RegisterMethodSXF(G,'procedure _SetCapacity(Value: Integer);',@TStrings_SetCapacity);
RegisterPropertySX(G,GoR,GoW,'Capacity','Integer');
GoR:=RegisterMethodSXF(G,'function _GetCommaText: String;',@TStrings_GetCommaText);
GoW:=RegisterMethodSXF(G,'procedure _SetCommaText(Value: String);',@TStrings_SetCommaText);
RegisterPropertySX(G,GoR,GoW,'CommaText','String');
GoR:=RegisterMethodSXF(G,'function _GetCount: Integer;',@TStrings_GetCount);
RegisterPropertySX(G,GoR,GoW,'Count','Integer');
GoR:=RegisterMethodSXF(G,'function _GetNames(Index: Integer): String;',@TStrings_GetNames);
RegisterPropertySX(G,GoR,GoW,'Names[Index: Integer]','String');
GoR:=RegisterMethodSXF(G,'function _GetObjects(Index: Integer): TObject;',@TStrings_GetObjects);
GoW:=RegisterMethodSXF(G,'procedure _SetObjects(Value: TObject; Index: Integer);',@TStrings_SetCommaText);
RegisterPropertySX(G,GoR,GoW,'Objects[Index: Integer]','TObject');
GoR:=RegisterMethodSXF(G,'function _GetValues(Index: Integer; const Name: String): String;',@TStrings_GetValues);
GoW:=RegisterMethodSXF(G,'procedure _SetValues(Value: String; const Name: String);',@TStrings_SetValues);
RegisterPropertySX(G,GoR,GoW,'Values[const Name: string]','String');
GoR:=RegisterMethodSXF(G,'function _GetStrings(Index: Integer; aIndex: Integer): string;',@TStrings_GetStrings);
GoW:=RegisterMethodSXF(G,'procedure _SetStrings(Value: String; Index: Integer);',@TStrings_SetStrings);
RegisterPropertySX(G,GoR,GoW,'Strings[Index: Integer]','String');
GoR:=RegisterMethodSXF(G,'function _GetText(Index: Integer): string;',@TStrings_GetText);
GoW:=RegisterMethodSXF(G,'procedure _SetText(Value: String);',@TStrings_SetText);
RegisterPropertySX(G,GoR,GoW,'Text','String');
GoR:=RegisterMethodSXF(G,'function _GetStringsAdapter(Index: Integer): IStringsAdapter;',@TStrings_GetStringsAdapter);
GoW:=RegisterMethodSXF(G,'procedure _SetStringsAdapter(Value: IStringsAdapter);',@TStrings_SetStringsAdapter);
RegisterPropertySX(G,GoR,GoW,'StringsAdapter','IStringsAdapter');
{TStringList}
G:=RegisterClassTypeSX(TStringList);
RegisterMethodSX(G,'destructor Destroy; override;', @TStringList.Destroy);
RegisterMethodSX(G,'function Add(const S: string): Integer; override;', @TStringList.Add);
RegisterMethodSX(G,'procedure Clear; override;', @TStringList.Clear);
RegisterMethodSX(G,'procedure Delete(Index: Integer); override;', @TStringList.Delete);
RegisterMethodSX(G,'procedure Exchange(Index1, Index2: Integer); override;', @TStringList.Exchange);
RegisterMethodSX(G,'function Find(const S: string; Out Index: Integer): Boolean; virtual;', @TStringList.Find);
RegisterMethodSX(G,'function IndexOf(const S: string): Integer; override;', @TStringList.IndexOf);
RegisterMethodSX(G,'procedure Insert(Index: Integer; const S: string); override;', @TStringList.Insert);
RegisterMethodSX(G,'procedure Sort; virtual;', @TStringList.Sort);
RegisterMethodSX(G,'procedure CustomSort(CompareFn: TStringListSortCompare); virtual;', @TStringList.CustomSort);
GoR:=RegisterMethodSXF(G,'function _GetDuplicates: TDuplicates;',@TStringList_GetDuplicates);
GoW:=RegisterMethodSXF(G,'procedure _SetDuplicates(Value: TDuplicates);',@TStringList_SetDuplicates);
RegisterPropertySX(G,GoR,GoW,'Duplicates','TDuplicates');
GoR:=RegisterMethodSXF(G,'function _GetSorted: Boolean;',@TStringList_GetSorted);
GoW:=RegisterMethodSXF(G,'procedure _SetSorted(Value: Boolean);',@TStringList_SetSorted);
RegisterPropertySX(G,GoR,GoW,'Sorted','Boolean');
GoR:=RegisterMethodSXF(G,'function _GetCaseSensitive: Boolean;',@TStringList_GetCaseSensitive);
GoW:=RegisterMethodSXF(G,'procedure _SetCaseSensitive(Value: Boolean);',@TStringList_SetCaseSensitive);
RegisterPropertySX(G,GoR,GoW,'CaseSensitive','Boolean');
GoR:=RegisterMethodSXF(G,'function _GetOnChange: TNotifyEvent;',@TStringList_GetOnChange);
GoW:=RegisterMethodSXF(G,'procedure _SetOnChange(Value: TNotifyEvent);',@TStringList_SetOnChange);
RegisterPropertySX(G,GoR,GoW,'OnChange','TNotifyEvent');
GoR:=RegisterMethodSXF(G,'function _GetOnChanging: TNotifyEvent;',@TStringList_GetOnChanging);
GoW:=RegisterMethodSXF(G,'procedure _SetOnChanging(Value: TNotifyEvent);',@TStringList_SetOnChanging);
RegisterPropertySX(G,GoR,GoW,'OnChanging','TNotifyEvent');
GoR:=RegisterMethodSXF(G,'function _GetOwnsObjects: TNotifyEvent;',@TStringList_GetOwnsObjects);
GoW:=RegisterMethodSXF(G,'procedure _SetOwnsObjects(Value: TNotifyEvent);',@TStringList_SetOwnsObjects);
RegisterPropertySX(G,GoR,GoW,'OwnsObjects','boolean');
end;
procedure RegisterTotalFor_Classesh;
begin
H:=-1;
// _RegConstants0;
//_RegTypes;
_RegCIOs0;
// _RegFuncsProcs0;
// _RegVariables0;
end;
end.