Library interface and setup


Classes

struct  doModuleData

Defines

#define DOMD_USES_RUNTIME   1
#define DOMD_IS_MAIN   4
#define DOMD_MAY_LOAD_MODULES   8
#define DOMD_MAY_OVERRIDE_TYPES   16
#define DOMD_OBJECT_TRACKING   32
#define DOMD_DENY_EARLY_UNLOAD   64

Typedefs

typedef DynObj *(* CreateDynObjFn )(const char *type, int type_id, const DynI *pdi_init)
typedef doModuleData *(* InitDynLibFn )(DynI *pdi_init)
typedef bool(* ExitDynLibFn )(bool is_query)
typedef bool(* DestroyDynObjFn )(void *pv, DynObjType *pdt)

Detailed Description


Typedef Documentation

typedef DynObj*(* CreateDynObjFn)(const char *type, int type_id, const DynI *pdi_init)

Protoptype for library functions that create objects . This function is usually named 'CreateDynObj'. The create function is free to create an object even if only one of type_id or type is defined.

Parameters:
type The type string naming type of object to be created
type_id The type ID of the object to be created
di_init A DynI object to be passed to constructor of new object
Returns:
The returned object is derived from DynObj (directly or indirectly)

typedef bool(* DestroyDynObjFn)(void *pv, DynObjType *pdt)

Protoptype for library functions that destroys objects. The default way to delete is through doDestroy, so this is not necessary to implement. When destroying objects not derived from DynObj/DynSharedI it is required.

Parameters:
pv is a pointer to object to destroy
pdt is a pointer to the type of the object
Returns:
true on succesful destroy.

typedef bool(* ExitDynLibFn)(bool is_query)

Prototype for a function called at library unload. If is_query is true, the library will not be closed now, given that the function returns false.

Parameters:
is_query is set to true if the library can 'object' to shutdown.
Returns:
true if library is ready to shut down (it may be shutdown anyway).

typedef doModuleData*(* InitDynLibFn)(DynI *pdi_init)

Protoptype for library init functions. Library init function is named 'InitDynLib'. It can be passed a DynI derived object from the app. It returns a pointer to a doModuleData structure. If the library is linked with DynObj.cpp this is not necessary it can return NULL.

Parameters:
pdi_init A pointer to a DynI derived object that the library can make sense of. It could also be DoRunTimeI which allows the library to connect with shared resources.
Returns:
A pointer to a doModuleData structure that describes types implemented by the plugin library and the compiler used to generate it.


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