|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
24 const char* fn_name) :
29 open(dll_name, fn_name);
43 if (!lib.open(dll_name)) {
45 status = STATUS_LIBRARY_NOT_FOUND;
47 status = STATUS_LIBRARY_NOT_LOADED;
54 status = STATUS_FACTORY_NOT_FOUND;
59 if (!useFactoryFunction(fn)) {
60 status = STATUS_FACTORY_NOT_FUNCTIONAL;
61 error =
"YARP hook in shared library misbehaved";
68 api.getClassName(buf, 256);
70 api.getBaseClassName(buf, 256);
87 if (api.systemVersion != 5) {
141 return baseClassName;
147 if (factory ==
nullptr) {
std::string getError() const
Get the latest error of the factory.
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
bool isValid()
Check if time is valid (non-zero).
int removeRef()
Decrement the reference count of this factory.
bool open(const char *dll_name, const char *fn_name=nullptr)
Configure the factory.
#define YARP_DEFAULT_FACTORY_NAME
SharedLibraryFactory()
Constructor for unconfigured factory.
std::string getName() const
Get the name associated with this factory.
Collection of hooks for creating/destroying a plugin.
int getStatus() const
Get the status of the factory.
int getReferenceCount() const
Get the current reference count of this factory.
std::string getClassName() const
Get the type associated with this factory.
int stat(const char *path)
Portable wrapper for the stat() function.
bool useFactoryFunction(void *factory)
Specify function to use as factory.
std::string getBaseClassName() const
Get the base type associated with this factory.
virtual ~SharedLibraryFactory()
Destructor.
bool isValid() const
Check if factory is configured and present.
const SharedLibraryClassApi & getApi() const
Get the factory API, which has creation/deletion methods.
int addRef()
Increment the reference count of this factory.