#include <DSO.h>
Definition at line 28 of file DSO.h.
Public Member Functions | |
DSO () | |
Default constructor this one does nothing but a few initializations on the handle and loaded variables. | |
DSO (const String &plName) | |
This constructor initializes on the handle and loaded variables, also it initializes the name of the dso. | |
~DSO () | |
void | load () |
Loads the dso into memory, this method requires the use of the second constructor, not the default one if you've used the default then you shold probably use the another load method. | |
void | load (const String &plName) |
Loads the dso defined by plName and updates the contents of the dso variable name. | |
void | unload () |
Unloads the dso from memory. | |
void * | getSymbol (const String &sym) |
Use this method whenever you want to obtain a symbol from the dso. | |
const String & | getDSOName () |
This method returns the name of the dso itself. | |
template<class T> | |
T * | createObject (const String &createfuncname="__xvr2_create_dsobject") |
template<class T> | |
void | destroyObject (T *obj, const String &destroyfuncname="__xvr2_destroy_dsobject") |
bool | isLoaded () |
Tells whenever the dso file has been loaded or not. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
virtual std::string | toString () |
Static Public Member Functions | |
static void | usleep (UInt32 usec) |
This will return how many CPUs are installed in the system. | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Attributes | |
String | dso |
Holds the filename of the shared object itself. | |
bool | loaded |
Tells if the object is loaded or not. | |
void * | handle |
This is the handle value as returned by the dlopen function. | |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::DSO::DSO | ( | ) |
Default constructor this one does nothing but a few initializations on the handle and loaded variables.
xvr2::DSO::DSO | ( | const String & | plName | ) |
This constructor initializes on the handle and loaded variables, also it initializes the name of the dso.
xvr2::DSO::~DSO | ( | ) |
void xvr2::DSO::load | ( | ) |
Loads the dso into memory, this method requires the use of the second constructor, not the default one if you've used the default then you shold probably use the another load method.
void xvr2::DSO::load | ( | const String & | plName | ) |
Loads the dso defined by plName and updates the contents of the dso variable name.
void xvr2::DSO::unload | ( | ) |
Unloads the dso from memory.
void* xvr2::DSO::getSymbol | ( | const String & | sym | ) |
Use this method whenever you want to obtain a symbol from the dso.
Referenced by xvr2::DSObjectFactory::create(), createObject(), xvr2::DSObjectFactory::destroy(), and destroyObject().
const String& xvr2::DSO::getDSOName | ( | ) |
This method returns the name of the dso itself.
T* xvr2::DSO::createObject | ( | const String & | createfuncname = "__xvr2_create_dsobject" |
) | [inline] |
Definition at line 81 of file DSO.h.
References getSymbol().
void xvr2::DSO::destroyObject | ( | T * | obj, | |
const String & | destroyfuncname = "__xvr2_destroy_dsobject" | |||
) | [inline] |
Definition at line 89 of file DSO.h.
References getSymbol().
bool xvr2::DSO::isLoaded | ( | ) | [inline] |
static void xvr2::System::usleep | ( | UInt32 | usec | ) | [static, inherited] |
This will return how many CPUs are installed in the system.
This will return the CPU speed in megahertz Will return the total amount of system memory Will return the total amount of free system memory Will freeze the software for usec microseconds
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
virtual std::string xvr2::Object::toString | ( | ) | [virtual, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
String xvr2::DSO::dso [protected] |
bool xvr2::DSO::loaded [protected] |
Tells if the object is loaded or not.
Definition at line 37 of file DSO.h.
Referenced by isLoaded().
void* xvr2::DSO::handle [protected] |
std::string xvr2::Object::__cls_name [protected, inherited] |