TObject = class
public
{ please don't change the order of virtual methods, because
their vmt offsets are used by some assembler code which uses
hard coded addresses (FK) }
constructor Create;
{ the virtual procedures must be in THAT order }
destructor Destroy;virtual;
class function newinstance : tobject;virtual;
procedure FreeInstance;virtual;
function SafeCallException(exceptobject : tobject;
exceptaddr : codepointer) : HResult;virtual;
procedure DefaultHandler(var message);virtual;
procedure Free;
class function InitInstance(instance : pointer) : tobject; {$ifdef SYSTEMINLINE} inline; {$endif}
procedure CleanupInstance;
class function ClassType : tclass;{$ifdef SYSTEMINLINE}inline;{$endif}
class function ClassInfo : pointer;
class function ClassName : shortstring;
class function ClassNameIs(const name : string) : boolean;
class function ClassParent : tclass;{$ifdef SYSTEMINLINE}inline;{$endif}
class function InstanceSize : SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
class function InheritsFrom(aclass : tclass) : boolean;
class function StringMessageTable : pstringmessagetable;
class function MethodAddress(const name : shortstring) : codepointer;
class function MethodName(address : codepointer) : shortstring;
function FieldAddress(const name : shortstring) : pointer;
{ new since Delphi 4 }
procedure AfterConstruction;virtual;
procedure BeforeDestruction;virtual;
{ new for gtk, default handler for text based messages }
procedure DefaultHandlerStr(var message);virtual;
{ message handling routines }
procedure Dispatch(var message);virtual;
procedure DispatchStr(var message);virtual;
{ interface functions }
function GetInterface(const iid : tguid; out obj) : boolean;
function GetInterface(const iidstr : shortstring;out obj) : boolean;
function GetInterfaceByStr(const iidstr : shortstring; out obj) : boolean;
function GetInterfaceWeak(const iid : tguid; out obj) : boolean; // equal to GetInterface but the interface returned is not referenced
class function GetInterfaceEntry(const iid : tguid) : pinterfaceentry;
class function GetInterfaceEntryByStr(const iidstr : shortstring) : pinterfaceentry;
class function GetInterfaceTable : pinterfacetable;
{ new since Delphi 2009 }
class function UnitName : {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};
class function QualifiedClassName: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};
function Equals(Obj: TObject) : boolean;virtual;
function GetHashCode: PtrInt;virtual;
function ToString: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};virtual;
end;