28 #if !defined(BOOST_PP_IS_ITERATING)
29 # error PyWrapperIter - do not include this file!
32 #define N BOOST_PP_ITERATION()
45 #define WRAPPER_PARAM(x, n, d) , d
47 template <
typename T BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS_Z(1, N,
typename A) >
48 class Wrapper< T BOOST_PP_COMMA_IF(
N) BOOST_PP_ENUM_PARAMS_Z(1,
N, A) BOOST_PP_REPEAT_1( BOOST_PP_SUB(BOOST_PP_INC(
WRAPPER_MAX_ARGS),
N),
WRAPPER_PARAM, WrapperNone) > :
public T
51 Wrapper(PyObject*
self BOOST_PP_COMMA_IF(
N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1,
N, A, a)) : T(BOOST_PP_ENUM_PARAMS_Z(1,
N, a))
64 for (
int i = 0; i < this->T::GetReferenceCount(); i++)
71 Wrapper(PyObject*
self,
const T& other) : T(other)
80 ROCKET_ASSERTMSG(self->ob_refcnt == 0,
"Python object being cleared up prematurely, reference count not 0.");
103 return self->ob_refcnt;
111 T::OnReferenceDeactivate();
#define NULL
Definition: Types.h:33
virtual void * GetScriptObject() const
Definition: WrapperIter.h:115
virtual void RemoveReference()
Overrride RemoveReference so we can push the call through to python.
Definition: WrapperIter.h:93
virtual void AddReference()
Override AddReference so we can push the call through to python.
Definition: WrapperIter.h:85
virtual void OnReferenceDeactivate()
Definition: WrapperIter.h:106
#define ROCKET_ASSERT(x)
Definition: Debug.h:66
#define WRAPPER_MAX_ARGS
Definition: Wrapper.h:51
#define WRAPPER_PARAM(x, n, d)
Definition: WrapperIter.h:45
#define N
Definition: WrapperIter.h:32
virtual ~Wrapper()
Definition: WrapperIter.h:76
virtual int GetReferenceCount()
Definition: WrapperIter.h:100
Wrapper(PyObject *self BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, a))
Definition: WrapperIter.h:51
Wrapper(PyObject *self, const T &other)
Definition: WrapperIter.h:71
#define ROCKET_ASSERTMSG(x, m)
Definition: Debug.h:74