DynObjLibI Class Reference

#include <DoBaseI.h>

Inheritance diagram for DynObjLibI:

DynI VObj DynObjLib

List of all members.

Public Types

enum  {
  NotLoaded = 0, LoadFailed, Loaded, Incompatible,
  InitFailed, CannotInit, Initialized, InitializedWithoutDoInit
}

Public Member Functions

Virtuals
Interface members

virtual DynObjType *docall doGetType (const DynI **pself=0) const
virtual int docall GetState ()=0
virtual const char *docall GetLibName ()=0
virtual const char *docall GetLibFileName ()=0
virtual DynObj *docall Create (const char *type, int type_id, const DynI *pdi_init=NULL)=0
virtual bool docall Destroy (VObj *pvo)=0
virtual void docall OnObjectCreate (DynObj *pdo, DynObjType *pdt)=0
virtual void docall OnObjectDestroy (DynObj *pdo, DynObjType *pdt)=0
virtual bool docall MayUnload ()=0
Inlines
Inline convenience functions

template<class T>
T * Create (const DynI *pdi_init=NULL)


Detailed Description

An interface to a DynObj library. It's used by DoRunTime when handling loaded libraries instantiated in different shared libraries.

Member Enumeration Documentation

anonymous enum

Library status. Library can be used only when status is Initialized


Member Function Documentation

virtual DynObjType* docall DynObjLibI::doGetType ( const DynI **  pself = 0  )  const [virtual]

Returns type of this object. Each type that wants to make itself known should override this method. DynI knows its own type so we get the type without any lookup. It is faster and works without registration.

Parameters:
pself allows fetching the actual 'this' used inside doGetType (from a side base, this will be different to the 'this' of the caller).
Returns:
A DynObjType pointer

Reimplemented from DynI.

Reimplemented in DynObjLib.

virtual int docall DynObjLibI::GetState (  )  [pure virtual]

Returns library state

Implemented in DynObjLib.

virtual const char* docall DynObjLibI::GetLibName (  )  [pure virtual]

Returns error from library loader Get library name.

Implemented in DynObjLib.

virtual const char* docall DynObjLibI::GetLibFileName (  )  [pure virtual]

Get library file-name.

Implemented in DynObjLib.

virtual DynObj* docall DynObjLibI::Create ( const char *  type,
int  type_id,
const DynI pdi_init = NULL 
) [pure virtual]

Create a DynObj from the library.

Parameters:
type is the name of the string.
type_id is the integer type ID of the type.
pdi_init is the argument to the object constructor.
object_size is currently not used, use 0.
Returns:
The new object or NULL if failed.

Implemented in DynObjLib.

virtual bool docall DynObjLibI::Destroy ( VObj pvo  )  [pure virtual]

Destroy a VObj or DynObj. If the object was created by this library it is destroyed.

Parameters:
pvo is the object to destroy.
Returns:
true if object belonged to this library and was destroyed.

Implemented in DynObjLib.

virtual void docall DynObjLibI::OnObjectCreate ( DynObj pdo,
DynObjType pdt 
) [pure virtual]

Used by DynObj.cpp when a DynOb jis destroyed. It's used for internal object tracking.

Implemented in DynObjLib.

template<class T>
T* DynObjLibI::Create ( const DynI pdi_init = NULL  )  [inline]

Template wrapper for Create DynObj.

Parameters:
pdi_init is the argument to the object constructor.
Returns:
The new object or NULL if failed.


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