OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
factory_macros.h File Reference

Go to the source code of this file.

Macros

#define FACTORY_TYPE_N0(_Module, _T)
 
#define FACTORY_PARAM_TYPE_N0(_Module, _T, _P)
 
#define FACTORY_TYPE_N1(_Module, _T, A0)
 
#define FACTORY_PARAM_TYPE_N1(_Module, _T, _P, A0)
 
#define FACTORY_TYPE_N2(_Module, _T, A0, A1)
 
#define FACTORY_PARAM_TYPE_N2(_Module, _T, _P, A0, A1)
 
#define FACTORY_TYPE_N3(_Module, _T, A0, A1, A2)
 
#define FACTORY_PARAM_TYPE_N3(_Module, _T, _P, A0, A1, A2)
 
#define FACTORY_TYPE_N4(_Module, _T, A0, A1, A2, A3)
 
#define FACTORY_PARAM_TYPE_N4(_Module, _T, _P, A0, A1, A2, A3)
 
#define FACTORY_TYPE_N5(_Module, _T, A0, A1, A2, A3, A4)
 
#define FACTORY_PARAM_TYPE_N5(_Module, _T, _P, A0, A1, A2, A3, A4)
 
#define FACTORY_TYPE_N6(_Module, _T, A0, A1, A2, A3, A4, A5)
 
#define FACTORY_PARAM_TYPE_N6(_Module, _T, _P, A0, A1, A2, A3, A4, A5)
 
#define FACTORY_TYPE_N7(_Module, _T, A0, A1, A2, A3, A4, A5, A6)
 
#define FACTORY_PARAM_TYPE_N7(_Module, _T, _P, A0, A1, A2, A3, A4, A5, A6)
 
#define FACTORY_TYPE_N8(_Module, _T, A0, A1, A2, A3, A4, A5, A6, A7)
 
#define FACTORY_PARAM_TYPE_N8(_Module, _T, _P, A0, A1, A2, A3, A4, A5, A6, A7)
 

Macro Definition Documentation

#define FACTORY_PARAM_TYPE_N0 (   _Module,
  _T,
  _P 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *()> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create() {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_();\
}\
private:\
boost::function<_T *()> make_ ## _T ## _ ## _P ## _\

Definition at line 26 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N1 (   _Module,
  _T,
  _P,
  A0 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0);\
}\
private:\
boost::function<_T *(A0)> make_ ## _T ## _ ## _P ## _\

Definition at line 62 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N2 (   _Module,
  _T,
  _P,
  A0,
  A1 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1);\
}\
private:\
boost::function<_T *(A0, A1)> make_ ## _T ## _ ## _P ## _\

Definition at line 98 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N3 (   _Module,
  _T,
  _P,
  A0,
  A1,
  A2 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1, A2)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1, A2 a2) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2);\
}\
private:\
boost::function<_T *(A0, A1, A2)> make_ ## _T ## _ ## _P ## _\

Definition at line 134 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N4 (   _Module,
  _T,
  _P,
  A0,
  A1,
  A2,
  A3 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1, A2, A3)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3)> make_ ## _T ## _ ## _P ## _\

Definition at line 170 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N5 (   _Module,
  _T,
  _P,
  A0,
  A1,
  A2,
  A3,
  A4 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4)> make_ ## _T ## _ ## _P ## _\

Definition at line 206 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N6 (   _Module,
  _T,
  _P,
  A0,
  A1,
  A2,
  A3,
  A4,
  A5 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4, A5)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4, A5)> make_ ## _T ## _ ## _P ## _\

Definition at line 242 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N7 (   _Module,
  _T,
  _P,
  A0,
  A1,
  A2,
  A3,
  A4,
  A5,
  A6 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5, a6);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> make_ ## _T ## _ ## _P ## _\

Definition at line 278 of file factory_macros.h.

#define FACTORY_PARAM_TYPE_N8 (   _Module,
  _T,
  _P,
  A0,
  A1,
  A2,
  A3,
  A4,
  A5,
  A6,
  A7 
)
Value:
public:\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ ## _P ## _ = function;\
}\
template <class U, int UP>\
static typename boost::enable_if_c<\
boost::is_same<U, _T>::value && (UP == (_P)), _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _ ## _P ##_(a0, a1, a2, a3, a4, a5, a6, a7);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> make_ ## _T ## _ ## _P ## _\

Definition at line 314 of file factory_macros.h.

#define FACTORY_TYPE_N0 (   _Module,
  _T 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *()> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create() {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _();\
}\
private:\
boost::function<_T *()> make_ ## _T ##_\

Definition at line 9 of file factory_macros.h.

#define FACTORY_TYPE_N1 (   _Module,
  _T,
  A0 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0);\
}\
private:\
boost::function<_T *(A0)> make_ ## _T ##_\

Definition at line 45 of file factory_macros.h.

#define FACTORY_TYPE_N2 (   _Module,
  _T,
  A0,
  A1 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1);\
}\
private:\
boost::function<_T *(A0, A1)> make_ ## _T ##_\

Definition at line 81 of file factory_macros.h.

#define FACTORY_TYPE_N3 (   _Module,
  _T,
  A0,
  A1,
  A2 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1, A2)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1, A2 a2) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1, a2);\
}\
private:\
boost::function<_T *(A0, A1, A2)> make_ ## _T ##_\

Definition at line 117 of file factory_macros.h.

#define FACTORY_TYPE_N4 (   _Module,
  _T,
  A0,
  A1,
  A2,
  A3 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1, A2, A3)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1, a2, a3);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3)> make_ ## _T ##_\

Definition at line 153 of file factory_macros.h.

#define FACTORY_TYPE_N5 (   _Module,
  _T,
  A0,
  A1,
  A2,
  A3,
  A4 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1, a2, a3, a4);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4)> make_ ## _T ##_\

Definition at line 189 of file factory_macros.h.

#define FACTORY_TYPE_N6 (   _Module,
  _T,
  A0,
  A1,
  A2,
  A3,
  A4,
  A5 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4, A5)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4, A5)> make_ ## _T ##_\

Definition at line 225 of file factory_macros.h.

#define FACTORY_TYPE_N7 (   _Module,
  _T,
  A0,
  A1,
  A2,
  A3,
  A4,
  A5,
  A6 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5, a6);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4, A5, A6)> make_ ## _T ##_\

Definition at line 261 of file factory_macros.h.

#define FACTORY_TYPE_N8 (   _Module,
  _T,
  A0,
  A1,
  A2,
  A3,
  A4,
  A5,
  A6,
  A7 
)
Value:
public:\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, void>::type\
Register(boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> function) {\
_Module *obj = GetInstance();\
obj->make_ ## _T ## _ = function;\
}\
template <class U>\
static typename boost::enable_if<boost::is_same<U, _T>, _T *>::type\
Create(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {\
_Module *obj = GetInstance();\
return obj->make_ ## _T ## _(a0, a1, a2, a3, a4, a5, a6, a7);\
}\
private:\
boost::function<_T *(A0, A1, A2, A3, A4, A5, A6, A7)> make_ ## _T ##_\

Definition at line 297 of file factory_macros.h.