Plugin.h++ File Reference

#include <commonc++/Common.h++>
#include <commonc++/String.h++>
Include dependency graph for Plugin.h++:

Go to the source code of this file.

Classes

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

Namespaces

namespace  ccxx

Defines

#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.

Define Documentation

#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); }                                                 \
  };

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.

#define COMMONCPP_PLUGIN_API
Generated on Fri Sep 3 23:48:44 2010 for libcommonc++ by  doxygen 1.6.3