Classes | Namespaces | Defines | Typedefs
builderext/PluggableBuilderExtension.hpp File Reference

Header of ... More...

Go to the source code of this file.

Classes

class  openfluid::builderext::PluggableBuilderExtension
class  openfluid::builderext::BuilderExtensionInfos
class  openfluid::builderext::BuilderExtensionPrefs

Namespaces

namespace  openfluid
namespace  openfluid::builderext

Defines

#define EXTENSION_PROC_NAME   "GetExtension"
#define EXTINFOS_PROC_NAME   "GetExtensionInfos"
#define EXTPREFS_PROC_NAME   "GetExtensionPrefs"
#define EXTSDKVERSION_PROC_NAME   "GetExtensionSDKVersion"
#define DECLARE_EXTENSION_HOOKS
#define EXT_PREFS_CLASS_DEFINED(seq)   BOOST_PP_EQUAL(BOOST_PP_SEQ_SIZE(seq),2)
#define EXT_RETURN_NEW(list)   return new BOOST_PP_SEQ_ELEM(1,BOOST_PP_SEQ_PUSH_BACK(list,dummy))();
#define EXT_RETURN_NULL   return (openfluid::builderext::BuilderExtensionPrefs*)0;
#define DEFINE_EXTENSION_HOOKS(pluginclassnames)
#define DEFINE_EXTENSION_INFOS(id, shortname, name, desc, authors, authorsctct, type)
#define ADD_TO_SET(r, data, elem)   data.insert(elem);
#define DEFINE_EXTENSION_DEFAULT_CONFIG(seq)

Typedefs

typedef std::map< std::string,
std::string > 
openfluid::builderext::ExtensionConfig_t
typedef
PluggableBuilderExtension *(* 
openfluid::builderext::GetExtensionProc )()
typedef BuilderExtensionInfos(* openfluid::builderext::GetExtensionInfosProc )()
typedef BuilderExtensionPrefs *(* openfluid::builderext::GetExtensionPrefsProc )()
typedef std::string(* openfluid::builderext::GetExtensionSDKVersionProc )()

Detailed Description

Header of ...

Author:
Jean-Christophe FABRE <fabrejc@supagro.inra.fr>

Define Documentation

#define ADD_TO_SET (   r,
  data,
  elem 
)    data.insert(elem);
Value:
extern "C" \
  { \
    DLLEXPORT std::string GetExtensionSDKVersion(); \
    DLLEXPORT openfluid::builderext::PluggableBuilderExtension* GetExtension(); \
    DLLEXPORT openfluid::builderext::BuilderExtensionInfos GetExtensionInfos(); \
    DLLEXPORT openfluid::builderext::BuilderExtensionPrefs* GetExtensionPrefs(); \
    DLLEXPORT std::set<std::string> GetDefaultConfig(); \
  }

Macro for declaration of extension and infos hooks

Value:
std::set<std::string> GetDefaultConfig()       \
    {                                              \
      std::set<std::string> config;                \
      BOOST_PP_SEQ_FOR_EACH(ADD_TO_SET,config,seq) \
      return config;                               \
    }
#define DEFINE_EXTENSION_HOOKS (   pluginclassnames)
Value:
std::string GetExtensionSDKVersion() \
  { \
    return std::string(openfluid::config::FULL_VERSION); \
  } \
  \
  openfluid::builderext::PluggableBuilderExtension* GetExtension() \
  { \
    openfluid::builderext::PluggableBuilderExtension* Ext = new BOOST_PP_SEQ_ELEM(0,pluginclassnames)(); \
      Ext->setDefaultConfiguration(GetDefaultConfig()); \
    return Ext; \
  } \
  \
  openfluid::builderext::BuilderExtensionPrefs* GetExtensionPrefs() \
  { \
    BOOST_PP_IF(EXT_PREFS_CLASS_DEFINED(pluginclassnames),EXT_RETURN_NEW(pluginclassnames),EXT_RETURN_NULL) \
  }

Macro for definition of extension hook

Parameters:
[in]pluginclassnamesThe names of the classes to instantiate in the form of a group of adjacent parenthesized elements: DEFINE_EXTENSION_HOOKS((pluginclassname)) or DEFINE_EXTENSION_HOOKS((pluginclassname) (pluginprefsclassname))
#define DEFINE_EXTENSION_INFOS (   id,
  shortname,
  name,
  desc,
  authors,
  authorsctct,
  type 
)
Value:
openfluid::builderext::BuilderExtensionInfos GetExtensionInfos() \
  { \
    openfluid::builderext::BuilderExtensionInfos BEI; \
    \
    BEI.ID = (id); \
    BEI.ShortName = (shortname); \
    BEI.Name = (name); \
    BEI.Description = (desc); \
    BEI.Authors = (authors); \
    BEI.AuthorsContact = (authorsctct); \
    BEI.Type = (type); \
    \
    return BEI; \
  }
#define EXT_PREFS_CLASS_DEFINED (   seq)    BOOST_PP_EQUAL(BOOST_PP_SEQ_SIZE(seq),2)
#define EXT_RETURN_NEW (   list)    return new BOOST_PP_SEQ_ELEM(1,BOOST_PP_SEQ_PUSH_BACK(list,dummy))();
#define EXTENSION_PROC_NAME   "GetExtension"

Extension hook name

#define EXTINFOS_PROC_NAME   "GetExtensionInfos"

Infos hook name

#define EXTPREFS_PROC_NAME   "GetExtensionPrefs"

Prefs hook name

#define EXTSDKVERSION_PROC_NAME   "GetExtensionSDKVersion"

SDK version hook name


Generated using Doxygen 1.7.6.1
Creative Commons License Creative Commons By-NC-ND license