Sign in Join
FPDoc Onlineexperiment

TObject class

In unit System

Base class of all classes.

Declaration

pascal
TObject = class

Descends from it: Exception TAbstractJSONWriter TAbstractTranslator TAggregatedObject TBaseJSONReader TBaseMapIterator TBasicActionLink TBits TBlowFish TBufIndex TButtonGlyph TChangeLink TCollection TCompressor TCustomAttribute TCustomBucketList TCustomHTTPEventSource TCustomImageListResolutions TCustomVariantType TDataPacketHandler TDblHashArray TDeCompressor TDOMNamedNodeMap TDOMNodeList TDOMParseOptions TDOMParser TEZcgi TFields TFileItem TFiler TFPCustomHashTable TFPExpressionScanner TFPExprNode TFPGListEnumerator TFPHashList TFPHashObjectList TFPList TFPObjectList TFPSList TFPTimerDriver TFunctionItem THashTable THelpManager THTCustomNode THTTPHeader TIDesigner TInterfacedObject TIPCClientComm TIPCServerComm TJSONComparer TJSONData TList TListItemMediator TLookupList TLResourceList TMaskUtils TMediatorManager TMimeType TMonitor TNodePool TNoRefCountObject TNSSupport TObservedHook TObserverMapping TOrderedList TPaperSize TParser TPersistent TPostScript TPostScriptCanvas TPrinter TPropInfoList TPropsStorage TPSObject TPSPattern TRecall TResourceFile TRouteObject TSQLHandle TStream TStream TStringHashList TStringList TStrListMaker TSynchroObject TTemplateParser TTextReader TThemeServices TUnZipper TValueItem TWidgetSet TXMLInputSource TZipper

Description

TObject is the parent root class for all classes in Object Pascal. If a class has no parent class explicitly declared, it is dependent on TObject. TObject introduces class methods that deal with the class' type information, and contains all necessary methods to create an instance at runtime, and to dispatch messages to the correct method (both string and integer messages).

See also

Properties

Disposedprotected

Methods

GetDisposedprotected
CreatepublicTObject Constructor.
DestroypublicTObject destructor.
newinstancepublicAllocate memory on the heap for a new instance.
FreeInstancepublicClean up instance and free the memory reserved for the instance.
SafeCallExceptionpublicHandle exception object.
DefaultHandlerpublicDefault handler for integer message handlers.
FreepublicCheck for Nil and call destructor.
InitInstancepublicInitialize a new class instance.
CleanupInstancepublicFinalize the class instance.
ClassTypepublicReturn a "class of" pointer for the current class.
ClassInfopublicReturn a pointer to the type information for this class.
ClassNamepublicReturn the current class name.
ClassNameIspublicCheck whether the class name equals the given name.
ClassParentpublicReturn the parent class.
InstanceSizepublicReturn the size of an instance.
InheritsFrompublicCheck whether class is an ancestor.
StringMessageTablepublicReturn a pointer to the string message table.
MethodAddresspublicReturn the address of a method.
MethodNamepublicReturn the name of a method.
GetLastCastErrorInfopublic
FieldAddresspublicReturn the address of a field.
AfterConstructionpublicMethod called after the constructor was called.
BeforeDestructionpublicMethod called before the destructor is called.
DefaultHandlerStrpublicDefault handler for string messages.
DispatchpublicDispatch an integer message.
DispatchStrpublicDispatch a string message.
GetInterfacepublicReturn a reference to an interface.
GetInterfaceByStrpublicReturn an interface based on its GUID.
GetInterfaceWeakpublicGet a reference to an interface, not increasing the reference count.
GetInterfaceEntrypublicReturn the interface table entry by GUID.
GetInterfaceEntryByStrpublicReturn the interface table entry by string.
GetInterfaceTablepublicReturn a pointer to the table of implemented interfaces for a class.
UnitNamepublicUnit name.
QualifiedClassNamepublicFully qualified classname.
DisposeOfpublic
CheckDisposedpublic
EqualspublicCheck if two objects are equal.
GetHashCodepublicReturn a hash code for the object.
ToStringpublicReturn a string representation for the object.

Types and constants

SystemHasExtendedRTTIpublic

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.