10 #if !defined(PROCESS_INFO_EXTENSIONS_H_INCLUDED)
11 #define PROCESS_INFO_EXTENSIONS_H_INCLUDED
13 #if !defined(DECLARE_HAS_THIS_TYPE_PROCESS_INFO)
14 #define DECLARE_HAS_THIS_TYPE_PROCESS_INFO \
15 template<class TVariable> \
16 static bool HasProcessInfo(TVariable const& rV, ProcessInfo::Pointer& p) \
21 #define DECLARE_HAS_THIS_TYPE_PROCESS_INFO_PYTHON(TClassName) \
22 .def_static("HasProcessInfo", &TClassName::HasProcessInfo< Variable< TClassName > >)
24 #define DECLARE_HAS_THIS_TYPE_PROCESS_INFO_PYTHON_AS_POINTER(TClassName) \
25 .def_static("HasProcessInfo", &TClassName::HasProcessInfo< Variable< TClassName::Pointer > >)
28 #if !defined(DECLARE_ADD_THIS_TYPE_TO_PROCESS_INFO)
29 #define DECLARE_ADD_THIS_TYPE_TO_PROCESS_INFO \
30 template<class TVariable> \
31 static void AddToProcessInfo(TVariable const& rV, typename TVariable::Type const& rValue, ProcessInfo::Pointer& p) \
33 p->SetValue(rV, rValue); \
36 #define DECLARE_ADD_THIS_TYPE_TO_PROCESS_INFO_PYTHON(TClassName) \
37 .def_static("AddToProcessInfo", &TClassName::AddToProcessInfo< Variable< TClassName > >)
39 #define DECLARE_ADD_THIS_TYPE_TO_PROCESS_INFO_PYTHON_AS_POINTER(TClassName) \
40 .def_static("AddToProcessInfo", &TClassName::AddToProcessInfo< Variable< TClassName::Pointer > >)
43 #if !defined(DECLARE_GET_THIS_TYPE_FROM_PROCESS_INFO)
44 #define DECLARE_GET_THIS_TYPE_FROM_PROCESS_INFO \
45 template<class TVariable> \
46 static typename TVariable::Type GetFromProcessInfo(TVariable const& rV, ProcessInfo::Pointer& p) \
48 return p->GetValue(rV); \
51 #define DECLARE_GET_THIS_TYPE_FROM_PROCESS_INFO_PYTHON(TClassName) \
52 .def_static("GetFromProcessInfo", &TClassName::GetFromProcessInfo< Variable< TClassName > >)
54 #define DECLARE_GET_THIS_TYPE_FROM_PROCESS_INFO_PYTHON_AS_POINTER(TClassName) \
55 .def_static("GetFromProcessInfo", &TClassName::GetFromProcessInfo< Variable< TClassName::Pointer > >)