GL Studio API
|
#include <live_component_lib_ref.h>
Public Member Functions | |
virtual void | DeleteInstance () |
void | LoadLibrary (const char *fileName, const bool searchLibraryPath=false) |
bool | Loaded () const |
const char * | ErrorString () const |
const char * | LoadedFilePath () const |
const GlsBuiltVersionInfo & | BuiltVersionInfo (const char *className) const |
const char * | DefaultClassName () const |
ComponentBase * | CreateLiveComponent (const char *className) const |
void | DeleteLiveComponent (const char *className, ComponentBase *comp) const |
RSOInterface1 * | CreateRSOInterface (const char *className, unsigned int &RSOVersion, bool hidePopups=false) const |
Static Public Member Functions | |
static LiveComponentLibRef * | CreateInstance (const LiveComponentLibRef &) |
static LiveComponentLibRef * | CreateInstance (const char *filePath=NULL) |
Protected Member Functions | |
LiveComponentLibRef (const char *filePath=NULL) | |
virtual | ~LiveComponentLibRef () |
This class is used to load a live component DLL (or .so) and allow easy calling of the live component library functions through the class methods. The library remains loaded until the reference is changed to another file or object destruction.
|
protected |
Constructs a LiveComponentLibRef. Private - call CreateInstance instead
filePath | If a file path is specified, it will attempt a load immediatly. |
|
protectedvirtual |
Destructor Private - call DeleteInstance instead.
const GlsBuiltVersionInfo& BuiltVersionInfo | ( | const char * | className | ) | const |
Returns the built version info for the given class.
className | The name of the class to check. |
|
static |
Constructs a LiveComponentLibRef.
|
static |
Constructs a LiveComponentLibRef.
filePath | If a file path is specified, it will attempt a load immediatly. |
ComponentBase* CreateLiveComponent | ( | const char * | className | ) | const |
Attempts to create a LiveComponent instance of the given class. Call Destroy() on the object to delete it safely. Objects returned by this method may not be safe to use if the GlsBuiltVersionInfo for the LiveComponent Library does not match that of the container.
className | The name of the class to instanciate. |
RSOInterface1* CreateRSOInterface | ( | const char * | className, |
unsigned int & | RSOVersion, | ||
bool | hidePopups = false |
||
) | const |
Attempts to create a LiveComponent instance of the given class using the safe interface. Call DestroyInstance() on the object to delete it safely.
className | The name of the class to instanciate. | |
[out] | RSOVersion | The version number of the RSO and the returned interface |
hidePopups | When enabled, tells the GL Studio runtime to hide popups for "missing license","missing texture", etc. |
const char* DefaultClassName | ( | ) | const |
|
virtual |
Delete a LiveComponentLibRef instance using the correct delete operator.
void DeleteLiveComponent | ( | const char * | className, |
ComponentBase * | comp | ||
) | const |
Safely delete an object that was returned from CreateLiveComponent.
className | Must be the same name that was passed to CreateLiveComponent |
comp | The component to delete |
const char* ErrorString | ( | ) | const |
Returns the last error string or NULL if no error has occured.
bool Loaded | ( | ) | const |
Returns true if the library was sucessfully loaded.
const char* LoadedFilePath | ( | ) | const |
Returns the path to the library or NULL if no library is loaded.
void LoadLibrary | ( | const char * | fileName, |
const bool | searchLibraryPath = false |
||
) |
Sets the desired file name (.DLL or .so). Set to NULL to unload the current library.