version 0.4.1
pythonhelpers.hh File Reference

Go to the source code of this file.

Macros

#define ENUM_BINDINGS_WITH_MODULE(Type, module)
 
#define ENUM_BINDINGS(Type)   ENUM_BINDINGS_WITH_MODULE(Type, m)
 

Macro Definition Documentation

◆ ENUM_BINDINGS

#define ENUM_BINDINGS (   Type)    ENUM_BINDINGS_WITH_MODULE(Type, m)

◆ ENUM_BINDINGS_WITH_MODULE

#define ENUM_BINDINGS_WITH_MODULE (   Type,
  module 
)
Value:
py::enum_<Type> Type##Enum(module, #Type); \
Type Type##EnumV = Type::BEGIN; \
Ikarus::increment(Type##EnumV); \
for (; Type##EnumV != Type::END; Ikarus::increment(Type##EnumV)) \
Type##Enum.value(toString(Type##EnumV).c_str(), Type##EnumV);
MessageType & increment(MessageType &e)
Increments the given enum value.
Definition: makeenum.hh:68
constexpr std::string toString(DBCOption _e)
Definition: dirichletbcenforcement.hh:7