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