22 #ifndef ROBOTTESTINGFRAMEWORK_SHAREDLIBRARYCLASS_H
23 #define ROBOTTESTINGFRAMEWORK_SHAREDLIBRARYCLASS_H
29 class SharedLibraryClass;
A type-safe wrapper for SharedLibraryFactory, committing to creation/destruction of instances of a pa...
Container for an object created using a factory provided by a shared library.
bool open(SharedLibraryClassFactory< T > &factory)
Construct an instance using the specified factory.
virtual bool close()
Destroy an instance if one has been created.
SharedLibraryClassFactory< T > * pfactory
SharedLibraryClass()
Constructor for empty instance.
bool isValid() const
Check whether a valid instance has been created.
virtual ~SharedLibraryClass()
Destructor.
T & getContent()
Gives access to the created instance.
T & operator*()
Shorthand for SharedLibraryClass::getContent.
T * operator->()
A pointer version of SharedLibraryClass::getContent.
SharedLibraryClass(SharedLibraryClassFactory< T > &factory)
Constructor for valid instance of a class from a shared library.
int addRef()
Increment the reference count of this factory.