gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
plugin_macros.hpp File Reference

declaration for gambit module More...

Include dependency graph for plugin_macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define REQD_INIFILE_ENTRIES(...)
 
#define REQD_LIRBARIES(...)
 
#define REQD_HEADERS(...)
 
#define SET_FLAG(...)
 
#define CXX_FLAGS(...)
 
#define _ARG_N_(_1_, _2_, _3_, _4_, ret, ...)   ret
 
#define __ARG_N__(...)   _ARG_N_(__VA_ARGS__ , 4, 3, 2, 1, 0)
 
#define __COMBINE__(a, b)   _COMBINE_(a, b)
 
#define _COMBINE_(a, b)   a ## b
 
#define _STR_(a)   #a
 
#define __STR__(a)   _STR_(a)
 
#define __PLUGIN_VERSION___4(major, minor, patch, release)   major ## _ ## minor ## _ ## patch ## _ ## release
 
#define __PLUGIN_VERSION___3(major, minor, patch)   __PLUGIN_VERSION___4(major, minor, patch, )
 
#define __PLUGIN_VERSION___2(major, minor)   __PLUGIN_VERSION___4(major, minor,,)
 
#define __PLUGIN_VERSION___1(major)   __PLUGIN_VERSION___4(major,,,)
 
#define __PLUGIN_VERSION___0()   __PLUGIN_VERSION___(,,,)
 
#define __PLUGIN_VERSION(...)   __COMBINE__(__PLUGIN_VERSION___,__ARG_N__(__VA_ARGS__))( __VA_ARGS__ )
 
#define EXPORT_ABSTRACT(name, ...)
 
#define EXPORT_OBJECT(name, ...)
 
#define PLUGIN_CONSTRUCTOR
 
#define PLUGIN_DECONSTRUCTOR
 
#define __PLUGIN_MAIN_RET_VAL__(...)   decltype(__plugin_main_ret_val__(typename Gambit::Scanner::func_ptr_type<void (__VA_ARGS__)>::type())) \
 
#define PLUGIN_MAIN(...)
 
#define __GAMBIT_PLUGIN__(plug_name, plug_type, plug_version)
 
#define _GAMBIT_PLUGIN_(plug_name, plug_type, plug_version)   __GAMBIT_PLUGIN__(plug_name, plug_type, plug_version) \
 
#define GAMBIT_PLUGIN_1(plugin_name)   _GAMBIT_PLUGIN_(plug_name,, __PLUGIN_no_version) \
 
#define GAMBIT_PLUGIN_2(plugin_name, plug_type)   _GAMBIT_PLUGIN_(plug_name, plug_type, __PLUGIN__no_version) \
 
#define GAMBIT_PLUGIN_3(plug_name, plug_type, plug_version)   _GAMBIT_PLUGIN_(plug_name, plug_type, __PLUGIN_ ## plug_version) \
 
#define GAMBIT_PLUGIN(...)   __COMBINE__(GAMBIT_PLUGIN_, __ARG_N__(__VA_ARGS__))(__VA_ARGS__ )
 
#define ___GAMBIT_PLUGIN_NAMESPACE___(plug_name, plug_type, plug_version)   namespace __gambit_plugin_ ## plug_name ## __t__ ## plug_type ## __v__ ## plug_version ## _namespace__ \
 
#define _GAMBIT_PLUGIN_NAMESPACE_(plug_name, plug_type, plug_version)   ___GAMBIT_PLUGIN_NAMESPACE___(plug_name, plug_type, plug_version) \
 
#define __GAMBIT_PLUGIN_NAMESPACE___1(plug_name)   _GAMBIT_PLUGIN_NAMESPACE_(plug_name,, __PLUGIN_no_version) \
 
#define __GAMBIT_PLUGIN_NAMESPACE___2(plug_name, plug_type)   _GAMBIT_PLUGIN_NAMESPACE_(plug_name, plug_type, __PLUGIN_no_version) \
 
#define __GAMBIT_PLUGIN_NAMESPACE___3(plug_name, plug_type, plug_version)   _GAMBIT_PLUGIN_NAMESPACE_(plug_name, plug_type, __PLUGIN_ ## plug_version) \
 
#define __GAMBIT_PLUGIN_NAMESPACE__(...)   __COMBINE__(__GAMBIT_PLUGIN_NAMESPACE___, __ARG_N__(__VA_ARGS__))(__VA_ARGS__) \
 
#define GAMBIT_PLUGIN_INITIALIZE(setup, ...)
 
gambit plugin macros

The main macros to be used by the user.

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
2013 August
2014 Feb
Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2014 Dec

Makes an abstract type of type "name" available to the plugin interface.

#define export_abstract(name, ...)   EXPORT_ABSTRACT(name, __VA_ARGS__)
 
#define export_object(name, ...)   EXPORT_OBJECT(name, __VA_ARGS__)
 Makes the object "name" available to the plugin interface. More...
 
#define plugin_main(...)   PLUGIN_MAIN( __VA_ARGS__ )
 Declaration of the main function which will be ran by the interface. More...
 
#define gambit_plugin(...)   GAMBIT_PLUGIN( __VA_ARGS__ )
 Generic plugin declaration of the from gambit_plugin(name, type, version) More...
 
#define plugin_constructor   PLUGIN_CONSTRUCTOR
 Runs when the plugin is loaded. More...
 
#define plugin_deconstructor   PLUGIN_DECONSTRUCTOR
 Runs when the plugin is destroyed. More...
 
#define __PLUGIN_version(...)   __PLUGIN_VERSION( __VA_ARGS__ )
 Sets the version number. More...
 
#define __PLUGIN_no_version   __PLUGIN_VERSION()
 Set version number to 0.0.0. More...
 
#define reqd_inifile_entries(...)   void reqd_inifile_entries()
 Tells ScannerBit that these tags are required. More...
 
#define reqd_libraries(...)   void reqd_libraries()
 Tells ScannerBit that these libraries are requested. More...
 
#define reqd_headers(...)   void reqd_headers()
 Tells ScannerBit that these include files must exist. More...
 
#define set_flag(...)   void set_flag()
 Tells ScannerBit to set a flag. More...
 
#define cxx_flags(...)   void scc_flags()
 

Detailed Description

declaration for gambit module


Authors (add name and date if you modify):

Definition in file plugin_macros.hpp.

Macro Definition Documentation

◆ ___GAMBIT_PLUGIN_NAMESPACE___

#define ___GAMBIT_PLUGIN_NAMESPACE___ (   plug_name,
  plug_type,
  plug_version 
)    namespace __gambit_plugin_ ## plug_name ## __t__ ## plug_type ## __v__ ## plug_version ## _namespace__ \

Definition at line 424 of file plugin_macros.hpp.

◆ __ARG_N__

#define __ARG_N__ (   ...)    _ARG_N_(__VA_ARGS__ , 4, 3, 2, 1, 0)

Definition at line 72 of file plugin_macros.hpp.

◆ __COMBINE__

#define __COMBINE__ (   a,
  b 
)    _COMBINE_(a, b)

Definition at line 73 of file plugin_macros.hpp.

◆ __GAMBIT_PLUGIN__

#define __GAMBIT_PLUGIN__ (   plug_name,
  plug_type,
  plug_version 
)

Definition at line 257 of file plugin_macros.hpp.

◆ __GAMBIT_PLUGIN_NAMESPACE__

#define __GAMBIT_PLUGIN_NAMESPACE__ (   ...)    __COMBINE__(__GAMBIT_PLUGIN_NAMESPACE___, __ARG_N__(__VA_ARGS__))(__VA_ARGS__) \

Definition at line 439 of file plugin_macros.hpp.

◆ __GAMBIT_PLUGIN_NAMESPACE___1

#define __GAMBIT_PLUGIN_NAMESPACE___1 (   plug_name)    _GAMBIT_PLUGIN_NAMESPACE_(plug_name,, __PLUGIN_no_version) \

Definition at line 430 of file plugin_macros.hpp.

◆ __GAMBIT_PLUGIN_NAMESPACE___2

#define __GAMBIT_PLUGIN_NAMESPACE___2 (   plug_name,
  plug_type 
)    _GAMBIT_PLUGIN_NAMESPACE_(plug_name, plug_type, __PLUGIN_no_version) \

Definition at line 433 of file plugin_macros.hpp.

◆ __GAMBIT_PLUGIN_NAMESPACE___3

#define __GAMBIT_PLUGIN_NAMESPACE___3 (   plug_name,
  plug_type,
  plug_version 
)    _GAMBIT_PLUGIN_NAMESPACE_(plug_name, plug_type, __PLUGIN_ ## plug_version) \

Definition at line 436 of file plugin_macros.hpp.

◆ __PLUGIN_MAIN_RET_VAL__

#define __PLUGIN_MAIN_RET_VAL__ (   ...)    decltype(__plugin_main_ret_val__(typename Gambit::Scanner::func_ptr_type<void (__VA_ARGS__)>::type())) \

Definition at line 221 of file plugin_macros.hpp.

◆ __PLUGIN_no_version

#define __PLUGIN_no_version   __PLUGIN_VERSION()

Set version number to 0.0.0.

Definition at line 53 of file plugin_macros.hpp.

◆ __PLUGIN_version

#define __PLUGIN_version (   ...)    __PLUGIN_VERSION( __VA_ARGS__ )

Sets the version number.

Definition at line 51 of file plugin_macros.hpp.

◆ __PLUGIN_VERSION

#define __PLUGIN_VERSION (   ...)    __COMBINE__(__PLUGIN_VERSION___,__ARG_N__(__VA_ARGS__))( __VA_ARGS__ )

Definition at line 83 of file plugin_macros.hpp.

◆ __PLUGIN_VERSION___0

#define __PLUGIN_VERSION___0 ( )    __PLUGIN_VERSION___(,,,)

Definition at line 82 of file plugin_macros.hpp.

◆ __PLUGIN_VERSION___1

#define __PLUGIN_VERSION___1 (   major)    __PLUGIN_VERSION___4(major,,,)

Definition at line 81 of file plugin_macros.hpp.

◆ __PLUGIN_VERSION___2

#define __PLUGIN_VERSION___2 (   major,
  minor 
)    __PLUGIN_VERSION___4(major, minor,,)

Definition at line 80 of file plugin_macros.hpp.

◆ __PLUGIN_VERSION___3

#define __PLUGIN_VERSION___3 (   major,
  minor,
  patch 
)    __PLUGIN_VERSION___4(major, minor, patch, )

Definition at line 79 of file plugin_macros.hpp.

◆ __PLUGIN_VERSION___4

#define __PLUGIN_VERSION___4 (   major,
  minor,
  patch,
  release 
)    major ## _ ## minor ## _ ## patch ## _ ## release

Definition at line 78 of file plugin_macros.hpp.

◆ __STR__

#define __STR__ (   a)    _STR_(a)

Definition at line 76 of file plugin_macros.hpp.

◆ _ARG_N_

#define _ARG_N_ (   _1_,
  _2_,
  _3_,
  _4_,
  ret,
  ... 
)    ret

Definition at line 71 of file plugin_macros.hpp.

◆ _COMBINE_

#define _COMBINE_ (   a,
  b 
)    a ## b

Definition at line 74 of file plugin_macros.hpp.

◆ _GAMBIT_PLUGIN_

#define _GAMBIT_PLUGIN_ (   plug_name,
  plug_type,
  plug_version 
)    __GAMBIT_PLUGIN__(plug_name, plug_type, plug_version) \

Definition at line 409 of file plugin_macros.hpp.

◆ _GAMBIT_PLUGIN_NAMESPACE_

#define _GAMBIT_PLUGIN_NAMESPACE_ (   plug_name,
  plug_type,
  plug_version 
)    ___GAMBIT_PLUGIN_NAMESPACE___(plug_name, plug_type, plug_version) \

Definition at line 427 of file plugin_macros.hpp.

◆ _STR_

#define _STR_ (   a)    #a

Definition at line 75 of file plugin_macros.hpp.

◆ cxx_flags

#define cxx_flags (   ...)    void scc_flags()

Definition at line 62 of file plugin_macros.hpp.

◆ CXX_FLAGS

#define CXX_FLAGS (   ...)

Definition at line 69 of file plugin_macros.hpp.

◆ export_abstract

#define export_abstract (   name,
  ... 
)    EXPORT_ABSTRACT(name, __VA_ARGS__)

Definition at line 39 of file plugin_macros.hpp.

◆ EXPORT_ABSTRACT

#define EXPORT_ABSTRACT (   name,
  ... 
)

Definition at line 86 of file plugin_macros.hpp.

◆ export_object

#define export_object (   name,
  ... 
)    EXPORT_OBJECT(name, __VA_ARGS__)

Makes the object "name" available to the plugin interface.

Definition at line 41 of file plugin_macros.hpp.

◆ EXPORT_OBJECT

#define EXPORT_OBJECT (   name,
  ... 
)

Definition at line 125 of file plugin_macros.hpp.

◆ gambit_plugin

#define gambit_plugin (   ...)    GAMBIT_PLUGIN( __VA_ARGS__ )

Generic plugin declaration of the from gambit_plugin(name, type, version)

Definition at line 45 of file plugin_macros.hpp.

◆ GAMBIT_PLUGIN

#define GAMBIT_PLUGIN (   ...)    __COMBINE__(GAMBIT_PLUGIN_, __ARG_N__(__VA_ARGS__))(__VA_ARGS__ )

Definition at line 421 of file plugin_macros.hpp.

◆ GAMBIT_PLUGIN_1

#define GAMBIT_PLUGIN_1 (   plugin_name)    _GAMBIT_PLUGIN_(plug_name,, __PLUGIN_no_version) \

Definition at line 412 of file plugin_macros.hpp.

◆ GAMBIT_PLUGIN_2

#define GAMBIT_PLUGIN_2 (   plugin_name,
  plug_type 
)    _GAMBIT_PLUGIN_(plug_name, plug_type, __PLUGIN__no_version) \

Definition at line 415 of file plugin_macros.hpp.

◆ GAMBIT_PLUGIN_3

#define GAMBIT_PLUGIN_3 (   plug_name,
  plug_type,
  plug_version 
)    _GAMBIT_PLUGIN_(plug_name, plug_type, __PLUGIN_ ## plug_version) \

Definition at line 418 of file plugin_macros.hpp.

◆ GAMBIT_PLUGIN_INITIALIZE

#define GAMBIT_PLUGIN_INITIALIZE (   setup,
  ... 
)
Value:
GAMBIT_PLUGIN(__VA_ARGS__) \
{ \
setup \
} \
__GAMBIT_PLUGIN_NAMESPACE__(__VA_ARGS__) \
#define GAMBIT_PLUGIN(...)

Definition at line 443 of file plugin_macros.hpp.

◆ plugin_constructor

#define plugin_constructor   PLUGIN_CONSTRUCTOR

Runs when the plugin is loaded.

Definition at line 47 of file plugin_macros.hpp.

Referenced by objective_plugin(), and scanner_plugin().

◆ PLUGIN_CONSTRUCTOR

#define PLUGIN_CONSTRUCTOR
Value:
namespace __gambit_plugin_namespace__ \
{ \
namespace \
{ \
template<> \
class interface <void (int)> \
{ \
public: \
\
interface(pluginData &myData) \
{ \
myData.inits.push_back(interface <void (int)>::init); \
} \
\
static void init(pluginData&) \
{ \
PLUGIN_CONSTRUCTOR(); \
} \
}; \
\
template <> \
interface <void (int)> reg_init <void (int)>::reg(myData); \
} \
} \
#define PLUGIN_CONSTRUCTOR

Definition at line 165 of file plugin_macros.hpp.

◆ plugin_deconstructor

#define plugin_deconstructor   PLUGIN_DECONSTRUCTOR

Runs when the plugin is destroyed.

Definition at line 49 of file plugin_macros.hpp.

◆ PLUGIN_DECONSTRUCTOR

#define PLUGIN_DECONSTRUCTOR
Value:
namespace __gambit_plugin_namespace__ \
{ \
namespace \
{ \
template<> \
class interface <void (void)> \
{ \
public: \
\
interface(pluginData &myData) \
{ \
myData.inits.push_back(interface <void (void)>::init); \
} \
\
static void init(pluginData &myData) \
{ \
myData.deconstructor = PLUGIN_DECONSTRUCTOR; \
} \
}; \
\
template <> \
interface <void (void)> reg_init <void (void)>::reg(myData); \
} \
} \
#define PLUGIN_DECONSTRUCTOR

Definition at line 193 of file plugin_macros.hpp.

◆ plugin_main

#define plugin_main (   ...)    PLUGIN_MAIN( __VA_ARGS__ )

Declaration of the main function which will be ran by the interface.

Definition at line 43 of file plugin_macros.hpp.

Referenced by objective_plugin(), and scanner_plugin().

◆ PLUGIN_MAIN

#define PLUGIN_MAIN (   ...)
Value:
__plugin_main_ret_val__(void (*)(__VA_ARGS__)); \
__PLUGIN_MAIN_RET_VAL__(__VA_ARGS__) PLUGIN_MAIN (__VA_ARGS__); \
namespace __gambit_plugin_namespace__ \
{ \
namespace \
{ \
template<> \
class interface <int (__VA_ARGS__)> \
{ \
public: \
\
interface(pluginData &myData) \
{ \
myData.inits.push_back(interface <int (__VA_ARGS__)>::init); \
} \
\
static void init(pluginData &myData) \
{ \
myData.plugin_mains[typeid(__PLUGIN_MAIN_RET_VAL__(__VA_ARGS__) (__VA_ARGS__))] = \
Gambit::Scanner::Plugins::funcFactory \
<__PLUGIN_MAIN_RET_VAL__(__VA_ARGS__) (__VA_ARGS__)>(PLUGIN_MAIN)(); \
} \
}; \
\
template <> \
interface <int (__VA_ARGS__)> reg_init <int (__VA_ARGS__)>::reg(myData); \
} \
} \
__PLUGIN_MAIN_RET_VAL__(__VA_ARGS__) PLUGIN_MAIN (__VA_ARGS__) \
#define __PLUGIN_MAIN_RET_VAL__(...)
#define PLUGIN_MAIN(...)

Definition at line 225 of file plugin_macros.hpp.

◆ reqd_headers

#define reqd_headers (   ...)    void reqd_headers()

Tells ScannerBit that these include files must exist.

Definition at line 59 of file plugin_macros.hpp.

Referenced by scanner_plugin().

◆ REQD_HEADERS

#define REQD_HEADERS (   ...)

Definition at line 67 of file plugin_macros.hpp.

◆ reqd_inifile_entries

#define reqd_inifile_entries (   ...)    void reqd_inifile_entries()

Tells ScannerBit that these tags are required.

Definition at line 55 of file plugin_macros.hpp.

Referenced by scanner_plugin().

◆ REQD_INIFILE_ENTRIES

#define REQD_INIFILE_ENTRIES (   ...)

Definition at line 65 of file plugin_macros.hpp.

◆ reqd_libraries

#define reqd_libraries (   ...)    void reqd_libraries()

Tells ScannerBit that these libraries are requested.

Definition at line 57 of file plugin_macros.hpp.

Referenced by scanner_plugin().

◆ REQD_LIRBARIES

#define REQD_LIRBARIES (   ...)

Definition at line 66 of file plugin_macros.hpp.

◆ set_flag

#define set_flag (   ...)    void set_flag()

Tells ScannerBit to set a flag.

Definition at line 61 of file plugin_macros.hpp.

◆ SET_FLAG

#define SET_FLAG (   ...)

Definition at line 68 of file plugin_macros.hpp.