YARP
Yet Another Robot Platform
SharedLibraryClassApi.h File Reference
#include <yarp/conf/system.h>
#include <yarp/os/Vocab.h>
#include <cstring>
+ Include dependency graph for SharedLibraryClassApi.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  yarp::os::SharedLibraryClassApi
 Collection of hooks for creating/destroying a plugin. More...
 

Namespaces

 yarp
 The main, catch-all namespace for YARP.
 
 yarp::os
 An interface to the operating system, including Port based communication.
 

Macros

#define YARP_SHAREDLIBRARYCLASSAPI_PADDING   (30 - 2 * (YARP_POINTER_SIZE / 4))
 
#define YARP_SHARED_CLASS_FN   extern "C" YARP_EXPORT
 
#define YARP_DEFINE_SHARED_SUBCLASS(factoryname, classname, basename)
 Macro to create a bunch of functions with undecorated names that can be found within a plugin library to handle creation/deletion of that plugin. More...
 
#define YARP_DEFAULT_FACTORY_NAME   "yarp_default_factory"
 
#define YARP_DEFINE_DEFAULT_SHARED_CLASS(classname)   YARP_DEFINE_SHARED_SUBCLASS(yarp_default_factory, classname, classname)
 
#define YARP_DEFINE_SHARED_CLASS(factoryname, classname)   YARP_DEFINE_SHARED_SUBCLASS(factoryname, classname, classname)
 

Macro Definition Documentation

◆ YARP_DEFAULT_FACTORY_NAME

#define YARP_DEFAULT_FACTORY_NAME   "yarp_default_factory"

Definition at line 145 of file SharedLibraryClassApi.h.

◆ YARP_DEFINE_DEFAULT_SHARED_CLASS

#define YARP_DEFINE_DEFAULT_SHARED_CLASS (   classname)    YARP_DEFINE_SHARED_SUBCLASS(yarp_default_factory, classname, classname)

Definition at line 146 of file SharedLibraryClassApi.h.

◆ YARP_DEFINE_SHARED_CLASS

#define YARP_DEFINE_SHARED_CLASS (   factoryname,
  classname 
)    YARP_DEFINE_SHARED_SUBCLASS(factoryname, classname, classname)

Definition at line 147 of file SharedLibraryClassApi.h.

◆ YARP_DEFINE_SHARED_SUBCLASS

#define YARP_DEFINE_SHARED_SUBCLASS (   factoryname,
  classname,
  basename 
)

Macro to create a bunch of functions with undecorated names that can be found within a plugin library to handle creation/deletion of that plugin.

Use with care.

Parameters
factorynamethe name of the "hook" function to make. A collection of other helper functions with names composed of the factoryname with _create/_destroy/... appended.
classnamethe class that the hook will be able to instantiate.
basenamethe superclass that the user of the plugin should be working with.

Definition at line 79 of file SharedLibraryClassApi.h.

◆ YARP_SHARED_CLASS_FN

#define YARP_SHARED_CLASS_FN   extern "C" YARP_EXPORT

Definition at line 61 of file SharedLibraryClassApi.h.

◆ YARP_SHAREDLIBRARYCLASSAPI_PADDING

#define YARP_SHAREDLIBRARYCLASSAPI_PADDING   (30 - 2 * (YARP_POINTER_SIZE / 4))

Definition at line 22 of file SharedLibraryClassApi.h.