6#ifndef YARP_OS_SHAREDLIBRARYCLASS_H
7#define YARP_OS_SHAREDLIBRARYCLASS_H
58 return content !=
nullptr;
68 if (content !=
nullptr) {
69 pfactory->destroy(content);
71 if (pfactory->removeRef() == 0) {
124 return content !=
nullptr;
A mini-server for performing network communication in the background.
static void unlock()
Call post() on a global mutual-exclusion semaphore allocated by YARP.
static void lock()
Call wait() on a global mutual-exclusion semaphore allocated by YARP.
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 ~SharedLibraryClass()
Destructor.
const T & operator*() const
Shorthand for SharedLibraryClass::getContent (const version)
const T & getContent() const
Gives access to the created instance (const version).
T & getContent()
Gives access to the created instance.
virtual bool close()
Destroy an instance if one has been created.
const T * operator->() const
A pointer version of SharedLibraryClass::getContent (const version)
bool isValid() const
Check whether a valid instance has been created.
T * operator->()
A pointer version of SharedLibraryClass::getContent.
T & operator*()
Shorthand for SharedLibraryClass::getContent.
SharedLibraryClass(SharedLibraryClassFactory< T > &factory)
Constructor for valid instance of a class from a shared library.
SharedLibraryClass()=default
Constructor for empty instance.
DumpObj * factory(Bottle &obj)
An interface to the operating system, including Port based communication.