VObj Class Reference
[VObj interfaces and base classes (not derived from DynI)]

#include <DynObj.h>

Inheritance diagram for VObj:

DynI DoModuleC DoRunTimeI DynData DynObj DynObjLibI NamedRefI DoRunTimeC DynSharedI DynStr DynObjLib DoRunTimeC

List of all members.

Public Member Functions

Non-virtuals
Functions included with DO_FAT_VOBJ define

DynObjTypeGetType () const
bool IsA (int type_id) const
bool CanBeA (int type_id) const
bool IsA (const char *type) const
void * GetObj (int type_id, doCastAlgo algo=doCastFull)
void * GetObj (const char *type, doCastAlgo algo=doCastFull)
const char * GetError (int *perr_code=NULL) const
void ClearError ()
bool SetError (const char *err_str, int err_code=-1) const
bool IsA (int type_id, DynObjType *ptype) const
bool CanBeA (int type_id, DynObjType *ptype) const
bool IsA (const char *type, DynObjType *ptype) const
const char * GetTypeName () const
bool doIsOk () const


Detailed Description

This is the "stipulated base class" for objects with virtual functions.

In this class the virtual functions (number of them, signatures) are not known. It only promises that it has a VTable, and we can do type lookups from that. VObjs can be used when we have C++ classes that don't derive from DynI. Objects of type VObj are not created, but one can get pointers to them through casts/queries (doGetVObj).


Member Function Documentation

DynObjType* VObj::GetType (  )  const

Returns type structure for this object. Does a global lookup using object VPTR.

Reimplemented in DynI.

bool VObj::IsA ( int  type_id  )  const [inline]

Test if object is of a certain type ID IsA returns true if the requested type can be returned without adjusting the 'this' pointer (must be main base class).

Reimplemented in DynI.

bool VObj::CanBeA ( int  type_id  )  const [inline]

Test if object 'can be' of a certain type ID CanBeA returns true if the requested type is available as any base class of the object (main base or side base).

Reimplemented in DynI.

bool VObj::IsA ( const char *  type  )  const [inline]

Same as IsA but using type string

Reimplemented in DynI.

void* VObj::GetObj ( int  type_id,
doCastAlgo  algo = doCastFull 
) [inline]

Raw cast, lookup internal type by type ID.

Reimplemented in DynI.

void* VObj::GetObj ( const char *  type,
doCastAlgo  algo = doCastFull 
) [inline]

Raw cast, lookup internal type by type string.

Reimplemented in DynI.

const char* VObj::GetError ( int *  perr_code = NULL  )  const

Returns current error string for object or NULL if no error

Parameters:
perr_code a location to store the error code, default is NULL
Returns:
The error string or NULL if no error.

void VObj::ClearError (  ) 

This will clear the error state for the object if set

bool VObj::SetError ( const char *  err_str,
int  err_code = -1 
) const

Set the internal error state for the object

bool VObj::IsA ( int  type_id,
DynObjType ptype 
) const

IsA variant, here we know our own type

bool VObj::CanBeA ( int  type_id,
DynObjType ptype 
) const

CanBeA variant, here we know our own type

bool VObj::IsA ( const char *  type,
DynObjType ptype 
) const

IsA variant, here we know our own type

const char* VObj::GetTypeName (  )  const [inline]

Returns name of type

Reimplemented in DynI.

bool VObj::doIsOk (  )  const [inline]

Check if object exists and has no errors

Reimplemented in DynI.


The documentation for this class was generated from the following file:

Generated on Sun Feb 15 16:35:57 2009 for DynObj by  doxygen 1.5.6