Bayeux  3.4.1
Core Foundation library for SuperNEMO
Macros
things_macros.h File Reference
#include <datatools/things.h>

Go to the source code of this file.

Macros

#define DATATOOLS_THINGS_ADD_BANK(ThingsVar, BankName, BankType, BankVar)   BankType& BankVar = ThingsVar.add<BankType>(BankName);
 
#define DATATOOLS_THINGS_CHECK_BANK(ThingsVar, BankName, BankType)   (ThingsVar.has(BankName) && ThingsVar.is_a<BankType>(BankName))
 
#define DATATOOLS_THINGS_CONST_BANK(ThingsVar, BankName, BankType, BankVar)
 
#define DATATOOLS_THINGS_MUTABLE_BANK(ThingsVar, BankName, BankType, BankVar)
 

Macro Definition Documentation

◆ DATATOOLS_THINGS_ADD_BANK

#define DATATOOLS_THINGS_ADD_BANK (   ThingsVar,
  BankName,
  BankType,
  BankVar 
)    BankType& BankVar = ThingsVar.add<BankType>(BankName);

◆ DATATOOLS_THINGS_CHECK_BANK

#define DATATOOLS_THINGS_CHECK_BANK (   ThingsVar,
  BankName,
  BankType 
)    (ThingsVar.has(BankName) && ThingsVar.is_a<BankType>(BankName))

◆ DATATOOLS_THINGS_CONST_BANK

#define DATATOOLS_THINGS_CONST_BANK (   ThingsVar,
  BankName,
  BankType,
  BankVar 
)
Value:
{ \
DT_THROW_IF (!ThingsVar.is_a<BankType>(BankName), \
std::logic_error, \
"No bank named '" << BankName << "' in '" << BOOST_PP_STRINGIZE(HandleVar) << "' !"); \
} \
const BankType& BankVar = ThingsVar.get<BankType>(BankName);

◆ DATATOOLS_THINGS_MUTABLE_BANK

#define DATATOOLS_THINGS_MUTABLE_BANK (   ThingsVar,
  BankName,
  BankType,
  BankVar 
)
Value:
{ \
DT_THROW_IF (!ThingsVar.is_a<BankType>(BankName), \
std::logic_error, \
"No bank named '" << BankName << "' in '" << BOOST_PP_STRINGIZE(HandleVar) << "' !"); \
} \
BankType& BankVar = ThingsVar.grab<BankType>(BankName);