[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'System' (#rtl)

TObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class of all classes.

Declaration

Source position: objpash.inc line 180

type TObject = class

public

  constructor Create;

  

TObject Constructor

  destructor Destroy; virtual;

  

TObject destructor.

  function newinstance; virtual;

  

Allocate memory on the heap for a new instance

  procedure FreeInstance; virtual;

  

Clean up instance and free the memory reserved for the instance.

  function SafeCallException(); virtual;

  

Handle exception object

  procedure DefaultHandler(); virtual;

  

Default handler for integer message handlers.

  procedure Free;

  

Check for Nil and call destructor.

  function InitInstance();

  

Initialize a new class instance.

  procedure CleanupInstance;

  

Finalize the class instance.

  function ClassType;

  

Return a "class of" pointer for the current class

  function ClassInfo;

  

Return a pointer to the type information for this class.

  function ClassName;

  

Return the current class name.

  function ClassNameIs();

  

Check whether the class name equals the given name.

  function ClassParent;

  

Return the parent class.

  function InstanceSize;

  

Return the size of an instance.

  function InheritsFrom();

  

Check whether class is an ancestor.

  function StringMessageTable;

  

Return a pointer to the string message table.

  function MethodAddress();

  

Return the address of a method

  function MethodName();

  

Return the name of a method.

  function FieldAddress();

  

Return the address of a field.

  procedure AfterConstruction; virtual;

  

Method called after the constructor was called.

  procedure BeforeDestruction; virtual;

  

Method called before the destructor is called.

  procedure DefaultHandlerStr(); virtual;

  

Default handler for string messages.

  procedure Dispatch(); virtual;

  

Dispatch an integer message

  procedure DispatchStr(); virtual;

  

Dispatch a string message.

  function GetInterface();

  

Return a reference to an interface

  function GetInterfaceByStr();

  

Return an interface based on its GUID

  function GetInterfaceEntry();

  

Return the interface table entry by GUID

  function GetInterfaceEntryByStr();

  

Return the interface table entry by string

  function GetInterfaceTable;

  

Return a pointer to the table of implemented interfaces for a class

  function UnitName;

  

Unit name

  function Equals(); virtual;

  

Check if two objects are equal.

  function GetHashCode; virtual;

  

Return a hash code for the object

  function ToString; virtual;

  

Return a string representation for the object

end;

Inheritance

TObject

  

Base class of all classes.

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

TClass

  

Class of TObject.


Documentation generated on: Nov 11 2010