GL Studio C++ Runtime API
|
#include <live_component_lib_ref.h>
Public Member Functions | |
virtual LiveComponentLibRef * | CloneObject () const |
virtual void | DeleteInstance () |
const LiveComponentLibRef & | operator= (const LiveComponentLibRef &) |
void | LoadLibrary (const char *fileName, const bool searchLibraryPath=false) |
void | UnloadLibrary () |
Unloads the file. | |
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 |
RsoImplBaseInterface * | CreateRSOInterface (const char *className, unsigned int &RSOVersion) 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) | |
LiveComponentLibRef (const LiveComponentLibRef &) | |
Copy constructor. | |
virtual | ~LiveComponentLibRef () |
void | DeleteLibrary () |
Unused, kept for backward compatibility. | |
bool | UpdateLoad () |
void | SetErrorString (const char *value) |
void | EnableDialogs (const char *className, bool value) const |
Protected Attributes | |
std::string | _loadedFilePath |
The path to the file that is currently loaded. | |
DynamicLibrary * | _lib |
Pointer to the underlying library reference. | |
char * | _errorString |
String of the last error encountered. | |
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. |
|
virtual |
|
static |
Constructs a LiveComponentLibRef.
filePath | If a file path is specified, it will attempt a load immediatly. |
|
static |
Constructs a LiveComponentLibRef.
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. |
RsoImplBaseInterface * CreateRSOInterface | ( | const char * | className, |
unsigned int & | RSOVersion | ||
) | 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 |
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 |
|
protected |
Allow or disallow version compatibility popups.
className | The generated class name. |
value | The new dialog enabled flag. |
const char * ErrorString | ( | ) | const |
bool Loaded | ( | ) | const |
const char * LoadedFilePath | ( | ) | const |
void LoadLibrary | ( | const char * | fileName, |
const bool | searchLibraryPath = false |
||
) |
Sets the desired file name (.DLL, .so, or .dylib). Set to NULL to unload the current library.
fileName | The name of the library to load. |
searchLibraryPath | Unused, kept for backward compatibility. |
const LiveComponentLibRef & operator= | ( | const LiveComponentLibRef & | ) |
Assignment operator
|
protected |
Set the underlying error string signifying the last error encountered.
value | The new error string to set. |
|
protected |
Unused, kept for backward compatibility.