The Conroy & Conroy Subroutine Library (2021.3 edition)

TBase_Object
What: Class
Ancestor: TObject
File: CommBase
Layer: 0
Platforms: C++, C#, Javascript, Pascal (All), PHP, Python

This class is the base class for standard static classes in the subroutine library. The class contains the following methods:

Attach
void Attach()
procedure Attach
Increments the reference count for the object.

Clone
TDelphi_Object* Clone()
function Clone : TDelphi_Object
Returns a new object which is a clone of this object. Note: this must be handled by descendant classes. The TDelphi_Object returns null.

Debugger
TDebug_Interface* Debugger()
function Debugger : TDebug_Interface
Returns a debugger instance for the class, or null if not supported.

Deserialize
bool Deserialize( TStream* Stream )
function Deserialize( Stream : TStream ) : boolean
Restores the object state from the specified serialization.

Detach
void Detach()
procedure Detach
Decrements the reference count for the object. If the reference count reaches 0, the object self-destructs. Note that self-destruction only occurs on platforms without automatic garbage collection.

Is_Class
bool Is_Class( const string Name )
function Is_Class( const Name : string ) : boolean
Returns true if the object is the specified class, or an ancestor of it.

Load
bool Load( TStream* Stream )
function Load( Stream : TStream ) : boolean
Sets the instance state from a binary representation saved via Persist.

Persist
bool Persist( TStream* Stream )
function Persist( Stream : TStream ) : boolean
Writes a binary definition of the object to the specified stream which can be used by Load to restore the current state.

Properties
TDynamic_Properties* Properties()
function Properties : TDynamic_Properties
Returns an instance of dynamic properties for this instance.

Reference_Count
int Reference_Count()
function Reference_Count : integer
Returns the current reference count.

Serialize
bool Serialize( TStream* Stream )
function Serialize( Stream : TStream ) : boolean
Writes a string serialization to the passed string which can be used to restore an instance of this class to its current state.

Test
void Test()
procedure Test
Runs a regression test for the class.