Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FLUSSPFERD_FN_CREATE_NATIVE_OBJECT(z, n_args, d) \
- template< \
- typename T \
- BOOST_PP_ENUM_TRAILING_PARAMS(n_args, typename T) \
- > \
- T &create_native_object( \
- object proto \
- BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(n_args, T, const & param) \
- ) { \
- if (!proto.is_valid()) \
- proto = get_current_context().get_prototype<T>(); \
- local_root_scope scope; \
- object obj = detail::create_native_object(proto); \
- return *(new T(obj BOOST_PP_ENUM_TRAILING_PARAMS(n_args, param))); \
- } \
- \
- template< \
- typename T \
- BOOST_PP_ENUM_TRAILING_PARAMS(n_args, typename T) \
- > \
- T &create_native_object( \
- object proto \
- BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(n_args, T, const & param) \
- , \
- typename boost::enable_if< \
- typename T::class_info::custom_enumerate >::type * = 0 \
- ) { \
- if (!proto.is_valid()) \
- proto = get_current_context().get_prototype<T>(); \
- local_root_scope scope; \
- object obj = detail::create_native_enumerable_object(proto); \
- return *(new T(obj BOOST_PP_ENUM_TRAILING_PARAMS(n_args, param))); \
- } \
- /**/
Add Comment
Please, Sign In to add comment