libcommonc++  0.7
Plugin.h++ File Reference
Include dependency graph for Plugin.h++:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Plugin
 A class representing a dynamically loaded plugin. More...
 

Namespaces

 ccxx
 

Macros

#define COMMONCPP_PLUGIN_API
 
#define CCXX_EXPORT_PLUGIN(CLASS, NAME, VERSION, AUTHOR)
 Exports the plugin whose implementation is in the class named CLASS (which must be a subclass of Plugin) whose name is indicated by the C string NAME, whose version is indicated by the C string VERSION, and whose author/copyright information is indicated by the C string AUTHOR, so that it can be dynamically loaded by a PluginLoader. More...
 

Macro Definition Documentation

◆ CCXX_EXPORT_PLUGIN

#define CCXX_EXPORT_PLUGIN (   CLASS,
  NAME,
  VERSION,
  AUTHOR 
)
Value:
extern "C" { \
COMMONCPP_PLUGIN_API ccxx::Plugin *ccxx_plugin_new(void) \
{ return(new CLASS); } \
COMMONCPP_PLUGIN_API const char *ccxx_plugin_version(void) \
{ return(VERSION); } \
COMMONCPP_PLUGIN_API const char *ccxx_plugin_name(void) \
{ return(NAME); } \
COMMONCPP_PLUGIN_API const char *ccxx_plugin_author(void) \
{ return(AUTHOR); } \
COMMONCPP_PLUGIN_API const char *ccxx_plugin_build_date(void) \
{ return(__DATE__ " " __TIME__); } \
COMMONCPP_PLUGIN_API const char *ccxx_plugin_class_name(void) \
{ return(#CLASS); } \
};
A class representing a dynamically loaded plugin.
Definition: Plugin.h++:40

Exports the plugin whose implementation is in the class named CLASS (which must be a subclass of Plugin) whose name is indicated by the C string NAME, whose version is indicated by the C string VERSION, and whose author/copyright information is indicated by the C string AUTHOR, so that it can be dynamically loaded by a PluginLoader.

This macro should be called from within the plugin implementation's source file but not within any namespace scope.

◆ COMMONCPP_PLUGIN_API

#define COMMONCPP_PLUGIN_API