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

Redirection macros for generic observable and likelihood function macro definitions, for inclusion from the Core. More...

#include <map>
#include "gambit/Elements/functors.hpp"
#include "gambit/Elements/types_rollcall.hpp"
#include "gambit/Elements/module_macros_common.hpp"
#include "gambit/Elements/safety_bucket.hpp"
#include "gambit/Elements/ini_functions.hpp"
#include "gambit/Elements/elements_extras.hpp"
#include "gambit/Elements/terminator.hpp"
#include "gambit/Utils/static_members.hpp"
#include "gambit/Utils/exceptions.hpp"
#include "gambit/Backends/backend_singleton.hpp"
#include "gambit/Models/claw_singleton.hpp"
#include "gambit/Models/safe_param_map.hpp"
#include "gambit/Core/ini_functions.hpp"
#include <boost/preprocessor/logical/bitand.hpp>
#include <boost/preprocessor/tuple/to_seq.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/seq/cat.hpp>
Include dependency graph for module_macros_incore_defs.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ALLOW_DUPLICATES_IN_PARAMS_MAP   0
 Change this to 1 if you really don't care about parameter clashes. More...
 
#define CORE_NEEDS_MANAGER_1(LOOPMAN)   CORE_NEEDS_MANAGER_MAIN(LOOPMAN, any)
 Redirection of NEEDS_MANAGER(LOOPMAN) when invoked from within the Core. More...
 
#define CORE_NEEDS_MANAGER_2(LOOPMAN, TYPE)
 Redirection of NEEDS_MANAGER(LOOPMAN,TYPE) when invoked from within the Core. More...
 
#define CORE_NEEDS_MANAGER_MAIN(LOOPMAN, TYPE)
 Main redirection of NEEDS_MANAGER(LOOPMAN,TYPE) when invoked from within the Core. More...
 
#define DEPENDENCY_COMMON(DEP, TYPE, MODULE, FUNCTION)
 Common components of CORE_DEPENDENCY(DEP, TYPE, MODULE, FUNCTION) and CORE_START_CONDITIONAL_DEPENDENCY(TYPE). More...
 
#define CORE_DEPENDENCY(DEP, TYPE, MODULE, FUNCTION, IS_MODEL_DEP)
 Redirection of DEPENDENCY(DEP, TYPE) when invoked from within the core. More...
 
#define CORE_ALLOWED_MODEL(MODULE, FUNCTION, MODEL, IS_MODEL)
 Redirection of ALLOW_MODEL when invoked from within the core. More...
 
#define CORE_ALLOW_MODEL_DEPENDENCE(MODULE, FUNCTION, MODEL, IS_MODEL)
 Redirection of ALLOW_MODEL_DEPENDENCE when invoked from within the core. More...
 
#define CORE_ALLOWED_MODEL_ARRANGE_DEP(MODULE, FUNCTION, MODEL)
 Set up the dependency on the parameters object of a given model. More...
 
#define CORE_ALLOW_MODEL(MODULE, FUNCTION, MODEL)
 Tell the functor that a single model is enough for it to be allowed to run. More...
 
#define CORE_ALLOW_MODEL_COMBINATION(MODULE, FUNCTION, IS_MODEL, COMBO)
 Redirection of ALLOW_MODEL_COMBINATION when invoked from the Core. More...
 
#define CORE_MODEL_GROUP(MODULE, FUNCTION, GROUPNAME, GROUP, IS_MODEL)
 Redirection of MODEL_GROUP when invoked from within the Core. More...
 
#define CORE_BE_GROUP(GROUP, IS_MODEL)
 Redirection of BACKEND_GROUP(GROUP) when invoked from within the Core. More...
 
#define CORE_BACKEND_REQ(MODULE, CAPABILITY, FUNCTION, GROUP, REQUIREMENT, TAGS, TYPE, ARGS, IS_VARIABLE, IS_MODEL)
 Redirection of BACKEND_REQ(GROUP, REQUIREMENT, (TAGS), TYPE, [(ARGS)]) for declaring backend requirements when invoked from within the Core. More...
 
#define CORE_BACKEND_OPTION(MODULE, CAPABILITY, FUNCTION, BE_AND_VER, TAGS, IS_MODEL)
 Redirection of BACKEND_OPTION(BACKEND_AND_VERSIONS, TAGS) when invoked from within the core. More...
 
#define CORE_FORCE_SAME_BACKEND(IS_MODEL, ...)
 Redirection of FORCE_SAME_BACKEND(TAGS) when invoked from within the core. More...
 
#define CORE_START_CONDITIONAL_DEPENDENCY(MODULE, CAPABILITY, FUNCTION, CONDITIONAL_DEPENDENCY, TYPE, IS_MODEL)
 Redirection of START_CONDITIONAL_DEPENDENCY(TYPE) when invoked from within the core. More...
 
#define CORE_ACTIVATE_DEP_BE(BACKEND_REQ, BACKEND, VERSTRING, IS_MODEL)
 Redirection of ACTIVATE_DEP_BE(BACKEND_REQ, BACKEND, VERSTRING) when invoked from within the core. More...
 
#define CORE_BE_MODEL_RULE(MODELS, TAGS, IS_MODEL)
 Redirection of ACTIVATE_BACKEND_REQ_FOR_MODELS when invoked from the Core. More...
 
#define ACTIVATE_DEP_MODEL(MODULE, CAPABILITY, FUNCTION, CONDITIONAL_DEPENDENCY, IS_MODEL, MODELSTRING)
 Redirection of ACTIVATE_FOR_MODELS(MODELSTRING) when invoked from within the core, inside a CONDITIONAL_DEPENDENCY definition. More...
 
#define CORE_CLASSLOAD_NEEDED(BACKEND, VERSTRING, IS_MODEL)
 Redirection of NEEDS_CLASSES_FROM when invoked from within the Core. More...
 
Tag-registration macros

Add a regular tag to the current namespace

#define ADD_TAG_IN_CURRENT_NAMESPACE(TAG)   namespace Tags { struct TAG; }
 
#define ADD_BETAG_IN_CURRENT_NAMESPACE(TAG)   namespace BETags { struct TAG; }
 Add a backend tag to the current namespace. More...
 
#define ADD_MODEL_TAG_IN_CURRENT_NAMESPACE(TAG)   namespace ModelTags { struct TAG; }
 Add a backend tag to the current namespace. More...
 
Actual in-core rollcall macros

These macros do the actual heavy lifting within the rollcall system.

#define CORE_START_MODULE_COMMON(MODULE)
 
#define CORE_START_MODULE
 Redirection of START_MODULE when invoked from within the core. More...
 
#define CORE_START_MODULE_COMMON_MAIN(MODULE)
 Central module definition macro, used by modules and models. More...
 
#define CORE_START_CAPABILITY(MODULE, CAPABILITY, IS_MODEL)
 Redirection of START_CAPABILITY when invoked from within the core. More...
 
#define CORE_DECLARE_FUNCTION(MODULE, CAPABILITY, FUNCTION, TYPE, FLAG, IS_MODEL)
 Redirection of START_FUNCTION when invoked from within the core. More...
 
#define MAKE_FUNCTOR(FUNCTION, TYPE, CAPABILITY, ORIGIN, CAN_MANAGE)
 
#define MAKE_FUNCTOR_MAIN(FUNCTION, TYPE, CAPABILITY, ORIGIN, CAN_MANAGE)
 Main parts of the functor creation. More...
 
#define CORE_NEEDS_MANAGER(...)
 
#define CORE_NEEDS_MANAGER_REDIRECT_2(_1, _2)   CORE_NEEDS_MANAGER_2(_1, _2)
 Variadic redirection for NEEDS_MANAGER when invoked within the Core. More...
 
#define CORE_NEEDS_MANAGER_REDIRECT_1(_1)   CORE_NEEDS_MANAGER_1(_1)
 
#define CORE_NEEDS_MANAGER_REDIRECT(...)   VARARG(CORE_NEEDS_MANAGER_REDIRECT, __VA_ARGS__)
 

Detailed Description

Redirection macros for generic observable and likelihood function macro definitions, for inclusion from the Core.

Note here that FUNCTION is the actual module function name, whereas both CAPABILITY and all DEPs refer to the abstract physical quantities that functions may provide or require. Thus, the provides() methods expect a quantity input (i.e. corresponding to a CAPABILITY), the requires() methods expect a quantity input for the dependency but a function name input (i.e. corresponding to a FUNCTION) for the actual dependent function, and all other things operate on the basis of the function name, not the quantity that is calculated.


Authors (add name and date if you modify):

Author
Pat Scott (patsc.nosp@m.ott@.nosp@m.physi.nosp@m.cs.m.nosp@m.cgill.nosp@m..ca)
Date
2012 Nov
2013,14 Foreverrrrr
Author
Abram Krislock (abram.nosp@m..kri.nosp@m.slock.nosp@m.@fys.nosp@m.ik.su.nosp@m..se)
Date
2013 Jan, Feb
Author
Christoph Weniger (c.wen.nosp@m.iger.nosp@m.@uva..nosp@m.nl)
Date
2013 Jan, Feb, 2014 Jan
Author
Anders Kvellestad (ander.nosp@m.s.kv.nosp@m.elles.nosp@m.tad@.nosp@m.fys.u.nosp@m.io.n.nosp@m.o)
Date
2013 Nov
Author
Ben Farmer (b.far.nosp@m.mer@.nosp@m.imper.nosp@m.ial..nosp@m.ac.uk)
Date
2019 Jul

Definition in file module_macros_incore_defs.hpp.

Macro Definition Documentation

◆ ACTIVATE_DEP_MODEL

#define ACTIVATE_DEP_MODEL (   MODULE,
  CAPABILITY,
  FUNCTION,
  CONDITIONAL_DEPENDENCY,
  IS_MODEL,
  MODELSTRING 
)

Redirection of ACTIVATE_FOR_MODELS(MODELSTRING) when invoked from within the core, inside a CONDITIONAL_DEPENDENCY definition.

Definition at line 1024 of file module_macros_incore_defs.hpp.

◆ ADD_BETAG_IN_CURRENT_NAMESPACE

#define ADD_BETAG_IN_CURRENT_NAMESPACE (   TAG)    namespace BETags { struct TAG; }

Add a backend tag to the current namespace.

Definition at line 88 of file module_macros_incore_defs.hpp.

◆ ADD_MODEL_TAG_IN_CURRENT_NAMESPACE

#define ADD_MODEL_TAG_IN_CURRENT_NAMESPACE (   TAG)    namespace ModelTags { struct TAG; }

Add a backend tag to the current namespace.

Definition at line 90 of file module_macros_incore_defs.hpp.

◆ ADD_TAG_IN_CURRENT_NAMESPACE

#define ADD_TAG_IN_CURRENT_NAMESPACE (   TAG)    namespace Tags { struct TAG; }

Definition at line 86 of file module_macros_incore_defs.hpp.

◆ ALLOW_DUPLICATES_IN_PARAMS_MAP

#define ALLOW_DUPLICATES_IN_PARAMS_MAP   0

Change this to 1 if you really don't care about parameter clashes.

Definition at line 57 of file module_macros_incore_defs.hpp.

◆ CORE_ACTIVATE_DEP_BE

#define CORE_ACTIVATE_DEP_BE (   BACKEND_REQ,
  BACKEND,
  VERSTRING,
  IS_MODEL 
)

Redirection of ACTIVATE_DEP_BE(BACKEND_REQ, BACKEND, VERSTRING) when invoked from within the core.

Definition at line 952 of file module_macros_incore_defs.hpp.

◆ CORE_ALLOW_MODEL

#define CORE_ALLOW_MODEL (   MODULE,
  FUNCTION,
  MODEL 
)
Value:
\
namespace MODULE \
{ \
/* Register the compatibility of the model with the functor */ \
const int CAT_3(MODEL,_allowed_for_,FUNCTION) = register_model_singly( \
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
int register_model_singly(module_functor_common &, const str &)
Register that a module function is compatible with a single model.
#define CAT_3(X, Y, Z)
Definition: cats.hpp:25
#define MODEL
Definition: Axions.hpp:99
#define MODULE
#define FUNCTION

Tell the functor that a single model is enough for it to be allowed to run.

Definition at line 653 of file module_macros_incore_defs.hpp.

◆ CORE_ALLOW_MODEL_COMBINATION

#define CORE_ALLOW_MODEL_COMBINATION (   MODULE,
  FUNCTION,
  IS_MODEL,
  COMBO 
)
Value:
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"ALLOW_MODEL_COMBINATION.")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"ALLOW_MODEL_COMBINATION. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
namespace MODULE \
{ \
/* Register the combination as allowed with the functor */ \
const int CAT_3(FUNCTION,_,BOOST_PP_SEQ_CAT(BOOST_PP_TUPLE_TO_SEQ(( \
STRINGIFY(COMBO)); \
} \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define IF_TOKEN_UNDEFINED(A, B)
#define CAT_3(X, Y, Z)
Definition: cats.hpp:25
int register_model_combination(module_functor_common &, const str &)
Register a combination of models as allowed with a functor.
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define MODULE
#define BOOST_PP_TUPLE_TO_SEQ(...)
#define FUNCTION
#define STRIP_PARENS(x)
Definition: util_macros.hpp:63
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of ALLOW_MODEL_COMBINATION when invoked from the Core.

Definition at line 664 of file module_macros_incore_defs.hpp.

◆ CORE_ALLOW_MODEL_DEPENDENCE

#define CORE_ALLOW_MODEL_DEPENDENCE (   MODULE,
  FUNCTION,
  MODEL,
  IS_MODEL 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"ALLOW_MODEL_DEPENDENCE.")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"ALLOW_MODEL_DEPENDENCE. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
/* Add MODEL to global set of tags of recognised models */ \
CORE_ALLOWED_MODEL_ARRANGE_DEP(MODULE,FUNCTION,MODEL) \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define MODEL
Definition: Axions.hpp:99
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define MODULE
#define FUNCTION
#define ADD_MODEL_TAG_IN_CURRENT_NAMESPACE(TAG)
Add a backend tag to the current namespace.
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of ALLOW_MODEL_DEPENDENCE when invoked from within the core.

Definition at line 541 of file module_macros_incore_defs.hpp.

◆ CORE_ALLOWED_MODEL

#define CORE_ALLOWED_MODEL (   MODULE,
  FUNCTION,
  MODEL,
  IS_MODEL 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"ALLOW_MODEL(S).")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"ALLOW_MODEL(S). Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
/* Add MODEL to global set of tags of recognised models */ \
CORE_ALLOWED_MODEL_ARRANGE_DEP(MODULE,FUNCTION,MODEL) \
CORE_ALLOW_MODEL(MODULE,FUNCTION,MODEL) \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define MODEL
Definition: Axions.hpp:99
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define MODULE
#define FUNCTION
#define ADD_MODEL_TAG_IN_CURRENT_NAMESPACE(TAG)
Add a backend tag to the current namespace.
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of ALLOW_MODEL when invoked from within the core.

Definition at line 518 of file module_macros_incore_defs.hpp.

◆ CORE_ALLOWED_MODEL_ARRANGE_DEP

#define CORE_ALLOWED_MODEL_ARRANGE_DEP (   MODULE,
  FUNCTION,
  MODEL 
)

Set up the dependency on the parameters object of a given model.

Definition at line 563 of file module_macros_incore_defs.hpp.

◆ CORE_BACKEND_OPTION

#define CORE_BACKEND_OPTION (   MODULE,
  CAPABILITY,
  FUNCTION,
  BE_AND_VER,
  TAGS,
  IS_MODEL 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"BACKEND_OPTION.")) \
IF_TOKEN_UNDEFINED(CAPABILITY,FAIL("You must define CAPABILITY before " \
"calling BACKEND_OPTION. Please check the rollcall header " \
"for " STRINGIFY(MODULE) ".")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"BACKEND_OPTION. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
namespace MODULE \
{ \
/* Apply the rule */ \
(BE_AND_VER))),_,BOOST_PP_SEQ_CAT(BOOST_PP_TUPLE_TO_SEQ(( \
STRINGIFY(BE_AND_VER), STRINGIFY(TAGS)); \
} \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
\
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CAPABILITY
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define CAT_5(A, B, X, Y, Z)
Definition: cats.hpp:27
#define MODULE
#define BOOST_PP_TUPLE_ELEM(...)
#define BOOST_PP_TUPLE_TO_SEQ(...)
#define FUNCTION
#define STRIP_PARENS(x)
Definition: util_macros.hpp:63
int apply_backend_option_rule(module_functor_common &, const str &, const str &)
Apply a backend option rule.
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of BACKEND_OPTION(BACKEND_AND_VERSIONS, TAGS) when invoked from within the core.

Definition at line 847 of file module_macros_incore_defs.hpp.

◆ CORE_BACKEND_REQ

#define CORE_BACKEND_REQ (   MODULE,
  CAPABILITY,
  FUNCTION,
  GROUP,
  REQUIREMENT,
  TAGS,
  TYPE,
  ARGS,
  IS_VARIABLE,
  IS_MODEL 
)

Redirection of BACKEND_REQ(GROUP, REQUIREMENT, (TAGS), TYPE, [(ARGS)]) for declaring backend requirements when invoked from within the Core.

Definition at line 755 of file module_macros_incore_defs.hpp.

◆ CORE_BE_GROUP

#define CORE_BE_GROUP (   GROUP,
  IS_MODEL 
)

Redirection of BACKEND_GROUP(GROUP) when invoked from within the Core.

Definition at line 716 of file module_macros_incore_defs.hpp.

◆ CORE_BE_MODEL_RULE

#define CORE_BE_MODEL_RULE (   MODELS,
  TAGS,
  IS_MODEL 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"ACTIVATE_BACKEND_REQ_FOR_MODEL(S).")) \
IF_TOKEN_UNDEFINED(CAPABILITY,FAIL("You must define CAPABILITY before " \
"calling ACTIVATE_BACKEND_REQ_FOR_MODEL(S). Please check the rollcall heade"\
"r for " STRINGIFY(MODULE) ".")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"ACTIVATE_BACKEND_REQ_FOR_MODEL(S). Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
namespace MODULE \
{ \
\
/* Apply the rule.*/ \
const int CAT_6(apply_rule_,FUNCTION,_, \
BOOST_PP_SEQ_CAT(BOOST_PP_TUPLE_TO_SEQ((STRIP_PARENS(MODELS)))),_, \
BOOST_PP_SEQ_CAT(BOOST_PP_TUPLE_TO_SEQ((STRIP_PARENS(TAGS)))) ) = \
set_backend_rule_for_model(Functown::FUNCTION,#MODELS,#TAGS); \
\
} \
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CAPABILITY
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define MODULE
#define BOOST_PP_TUPLE_TO_SEQ(...)
#define CAT_6(A, B, C, X, Y, Z)
Definition: cats.hpp:28
#define FUNCTION
#define STRIP_PARENS(x)
Definition: util_macros.hpp:63
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of ACTIVATE_BACKEND_REQ_FOR_MODELS when invoked from the Core.

Definition at line 991 of file module_macros_incore_defs.hpp.

◆ CORE_CLASSLOAD_NEEDED

#define CORE_CLASSLOAD_NEEDED (   BACKEND,
  VERSTRING,
  IS_MODEL 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"NEEDS_CLASSES_FROM.")) \
IF_TOKEN_UNDEFINED(CAPABILITY,FAIL("You must define CAPABILITY before " \
"calling NEEDS_CLASSES_FROM. Please check the rollcall header " \
"for " STRINGIFY(MODULE) ".")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"NEEDS_CLASSES_FROM. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
namespace MODULE \
{ \
\
const int CAT_4(classloading_from_,BACKEND,_for_,FUNCTION) = \
set_classload_requirements(Functown::FUNCTION, STRINGIFY(BACKEND), \
VERSTRING, STRINGIFY(CAT(Default_,BACKEND))); \
\
} \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
\
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CAPABILITY
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define CAT_4(A, X, Y, Z)
Definition: cats.hpp:26
#define MODULE
#define FUNCTION
TODO: see if we can use this one:
Definition: Analysis.hpp:33
#define CAT(X, Y)
Concatenate macro arguments for 2-7 arguments.
Definition: cats.hpp:22

Redirection of NEEDS_CLASSES_FROM when invoked from within the Core.

Definition at line 1061 of file module_macros_incore_defs.hpp.

◆ CORE_DECLARE_FUNCTION

#define CORE_DECLARE_FUNCTION (   MODULE,
  CAPABILITY,
  FUNCTION,
  TYPE,
  FLAG,
  IS_MODEL 
)

Redirection of START_FUNCTION when invoked from within the core.

Definition at line 227 of file module_macros_incore_defs.hpp.

◆ CORE_DEPENDENCY

#define CORE_DEPENDENCY (   DEP,
  TYPE,
  MODULE,
  FUNCTION,
  IS_MODEL_DEP 
)
Value:
\
namespace Gambit \
{ \
\
/* Add DEP to global set of tags of recognised module capabilities/deps */ \
ADD_TAG_IN_CURRENT_NAMESPACE(DEP) \
\
/* Put everything inside the Models namespace if this is a model dep */ \
BOOST_PP_IIF(IS_MODEL_DEP, namespace Models {, ) \
\
namespace MODULE \
{ \
DEPENDENCY_COMMON(DEP, TYPE, MODULE, FUNCTION) \
\
const int CAT_3(DEP,_for_,FUNCTION) = register_dependency( \
&resolve_dependency<Gambit::Tags::DEP, Tags::FUNCTION>); \
} \
\
/* Close the Models namespace if this is a model dep */ \
BOOST_PP_IIF(IS_MODEL_DEP, }, ) \
\
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CAT_3(X, Y, Z)
Definition: cats.hpp:25
int register_dependency(module_functor_common &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a dependency of a module function.
#define MODULE
#define FUNCTION
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of DEPENDENCY(DEP, TYPE) when invoked from within the core.

Definition at line 492 of file module_macros_incore_defs.hpp.

◆ CORE_FORCE_SAME_BACKEND

#define CORE_FORCE_SAME_BACKEND (   IS_MODEL,
  ... 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"FORCE_SAME_BACKEND.")) \
IF_TOKEN_UNDEFINED(CAPABILITY,FAIL("You must define CAPABILITY before " \
"calling FORCE_SAME_BACKEND. Please check the rollcall header " \
"for " STRINGIFY(MODULE) ".")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"FORCE_SAME_BACKEND. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
namespace MODULE \
{ \
const int CAT_3(FUNCTION,_,BOOST_PP_SEQ_CAT(BOOST_PP_TUPLE_TO_SEQ(( \
STRIP_PARENS(__VA_ARGS__))))) = \
apply_backend_matching_rule(Functown::FUNCTION, #__VA_ARGS__); \
} \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
\
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CAPABILITY
#define CAT_3(X, Y, Z)
Definition: cats.hpp:25
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define MODULE
#define BOOST_PP_TUPLE_TO_SEQ(...)
#define FUNCTION
#define STRIP_PARENS(x)
Definition: util_macros.hpp:63
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of FORCE_SAME_BACKEND(TAGS) when invoked from within the core.

Definition at line 880 of file module_macros_incore_defs.hpp.

◆ CORE_MODEL_GROUP

#define CORE_MODEL_GROUP (   MODULE,
  FUNCTION,
  GROUPNAME,
  GROUP,
  IS_MODEL 
)
Value:
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"MODEL_GROUP.")) \
IF_TOKEN_UNDEFINED(FUNCTION,FAIL("You must define FUNCTION before calling " \
"MODEL_GROUP. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
/* Register the group with the functor */ \
namespace Gambit \
{ \
/* Put everything inside the Models namespace if this is a model-module */ \
BOOST_PP_IIF(IS_MODEL, namespace Models {, ) \
\
namespace MODULE \
{ \
/* Register the model group with the functor */ \
const int CAT_3(GROUPNAME,_model_group_in_,FUNCTION) = \
register_model_group(Functown::FUNCTION, STRINGIFY(GROUPNAME), \
STRINGIFY(GROUP)); \
} \
\
/* End Models namespace */ \
BOOST_PP_IIF(IS_MODEL, }, ) \
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define IF_TOKEN_UNDEFINED(A, B)
#define CAT_3(X, Y, Z)
Definition: cats.hpp:25
#define FAIL(x)
Definition: util_macros.hpp:37
#define IS_MODEL
#define MODULE
#define FUNCTION
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of MODEL_GROUP when invoked from within the Core.

Definition at line 690 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER

#define CORE_NEEDS_MANAGER (   ...)
Value:
namespace Gambit { namespace MODULE { const int CAT(FUNCTION, \
int register_management_req(module_functor_common &)
Register a loop management requirement with the Core.
#define MODULE
#define FUNCTION
#define CORE_NEEDS_MANAGER_REDIRECT(...)
TODO: see if we can use this one:
Definition: Analysis.hpp:33
#define CAT(X, Y)
Concatenate macro arguments for 2-7 arguments.
Definition: cats.hpp:22

Definition at line 378 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER_1

#define CORE_NEEDS_MANAGER_1 (   LOOPMAN)    CORE_NEEDS_MANAGER_MAIN(LOOPMAN, any)

Redirection of NEEDS_MANAGER(LOOPMAN) when invoked from within the Core.

Definition at line 392 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER_2

#define CORE_NEEDS_MANAGER_2 (   LOOPMAN,
  TYPE 
)
Value:
CORE_NEEDS_MANAGER_MAIN(LOOPMAN,TYPE) \
DEPENDENCY(LOOPMAN,TYPE)
#define CORE_NEEDS_MANAGER_MAIN(LOOPMAN, TYPE)
Main redirection of NEEDS_MANAGER(LOOPMAN,TYPE) when invoked from within the Core.

Redirection of NEEDS_MANAGER(LOOPMAN,TYPE) when invoked from within the Core.

Definition at line 396 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER_MAIN

#define CORE_NEEDS_MANAGER_MAIN (   LOOPMAN,
  TYPE 
)

Main redirection of NEEDS_MANAGER(LOOPMAN,TYPE) when invoked from within the Core.

Definition at line 401 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER_REDIRECT

#define CORE_NEEDS_MANAGER_REDIRECT (   ...)    VARARG(CORE_NEEDS_MANAGER_REDIRECT, __VA_ARGS__)

Definition at line 388 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER_REDIRECT_1

#define CORE_NEEDS_MANAGER_REDIRECT_1 (   _1)    CORE_NEEDS_MANAGER_1(_1)

Definition at line 387 of file module_macros_incore_defs.hpp.

◆ CORE_NEEDS_MANAGER_REDIRECT_2

#define CORE_NEEDS_MANAGER_REDIRECT_2 (   _1,
  _2 
)    CORE_NEEDS_MANAGER_2(_1, _2)

Variadic redirection for NEEDS_MANAGER when invoked within the Core.

Definition at line 386 of file module_macros_incore_defs.hpp.

◆ CORE_START_CAPABILITY

#define CORE_START_CAPABILITY (   MODULE,
  CAPABILITY,
  IS_MODEL 
)
Value:
\
IF_TOKEN_UNDEFINED(MODULE,FAIL("You must define MODULE before calling " \
"START_CAPABILITY.")) \
IF_TOKEN_UNDEFINED(CAPABILITY,FAIL("You must define CAPABILITY before " \
"calling START_CAPABILITY. Please check the rollcall header for " \
STRINGIFY(MODULE) ".")) \
\
namespace Gambit \
{ \
/* Add CAPABILITY to the global set of things that can be calculated*/ \
ADD_TAG_IN_CURRENT_NAMESPACE(CAPABILITY) \
\
} \
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CAPABILITY
#define FAIL(x)
Definition: util_macros.hpp:37
#define MODULE
TODO: see if we can use this one:
Definition: Analysis.hpp:33

Redirection of START_CAPABILITY when invoked from within the core.

Definition at line 209 of file module_macros_incore_defs.hpp.

◆ CORE_START_CONDITIONAL_DEPENDENCY

#define CORE_START_CONDITIONAL_DEPENDENCY (   MODULE,
  CAPABILITY,
  FUNCTION,
  CONDITIONAL_DEPENDENCY,
  TYPE,
  IS_MODEL 
)

Redirection of START_CONDITIONAL_DEPENDENCY(TYPE) when invoked from within the core.

Definition at line 912 of file module_macros_incore_defs.hpp.

◆ CORE_START_MODULE

#define CORE_START_MODULE

Redirection of START_MODULE when invoked from within the core.

Definition at line 112 of file module_macros_incore_defs.hpp.

◆ CORE_START_MODULE_COMMON

#define CORE_START_MODULE_COMMON (   MODULE)
Value:
const int module_registered = register_module(STRINGIFY(MODULE));
#define STRINGIFY(X)
Definition: stringify.hpp:29
#define CORE_START_MODULE_COMMON_MAIN(MODULE)
Central module definition macro, used by modules and models.
#define MODULE
int register_module(str)
Register a module with the Core.

Definition at line 105 of file module_macros_incore_defs.hpp.

◆ CORE_START_MODULE_COMMON_MAIN

#define CORE_START_MODULE_COMMON_MAIN (   MODULE)

Central module definition macro, used by modules and models.

Definition at line 156 of file module_macros_incore_defs.hpp.

◆ DEPENDENCY_COMMON

#define DEPENDENCY_COMMON (   DEP,
  TYPE,
  MODULE,
  FUNCTION 
)

◆ MAKE_FUNCTOR

#define MAKE_FUNCTOR (   FUNCTION,
  TYPE,
  CAPABILITY,
  ORIGIN,
  CAN_MANAGE 
)
Value:
MAKE_FUNCTOR_MAIN(FUNCTION,TYPE,CAPABILITY,ORIGIN,CAN_MANAGE) \
const int CAT(FUNCTION,_registered2) = \
register_module_functor_core(Functown::FUNCTION);
#define CAPABILITY
#define FUNCTION
#define MAKE_FUNCTOR_MAIN(FUNCTION, TYPE, CAPABILITY, ORIGIN, CAN_MANAGE)
Main parts of the functor creation.
#define CAT(X, Y)
Concatenate macro arguments for 2-7 arguments.
Definition: cats.hpp:22

Definition at line 289 of file module_macros_incore_defs.hpp.

◆ MAKE_FUNCTOR_MAIN

#define MAKE_FUNCTOR_MAIN (   FUNCTION,
  TYPE,
  CAPABILITY,
  ORIGIN,
  CAN_MANAGE 
)

Main parts of the functor creation.

Definition at line 297 of file module_macros_incore_defs.hpp.