19 #ifndef INCLUDE_SF_SFNEW_HPP 20 #define INCLUDE_SF_SFNEW_HPP 24 #include <RCF/Tools.hpp> 26 #include <RCF/Exception.hpp> 27 #include <RCF/TypeTraits.hpp> 33 template<
typename T,
typename R>
34 R sfNewImpl(T*, R*, Archive &, RCF::TrueType *)
41 template<
typename T,
typename R>
42 R sfNewImpl(T*, R*, Archive &, RCF::FalseType *)
47 template<
typename T,
typename R>
48 R sfNew(T*t, R*r, Archive &ar)
50 typedef typename std::is_abstract<T>::type type;
51 return sfNewImpl(t, r, ar, (type *) NULL);
54 template<
typename T,
unsigned int N,
typename R>
55 R sfNew(T (*)[N], R*, Archive &)
65 #define SF_CTOR(type, ctor) \ 66 inline type *sfNew(type*, type **, SF::Archive &) \ 73 #define SF_CUSTOM_CTOR(type, func) \ 74 inline type *sfNew(type*, type **, SF::Archive & ar) \ 83 #define SF_NO_CTOR(type) \ 84 inline type *sfNew(type*, type **, SF::Archive &) \ 86 RCF::Exception e(RCF::RcfError_SfNoCtor); \ 93 #define SF_NO_CTOR_T1(type) \ 94 template<typename T> \ 95 inline type<T> *sfNew(type<T>*, type<T> **, SF::Archive &) \ 97 RCF::Exception e(RCF::RcfError_SfNoCtor); \ 104 #define SF_NO_CTOR_T2(type) \ 105 template<typename T, typename U> \ 106 inline type<T,U> *sfNew(type<T,U>*, type<T,U> **, SF::Archive &) \ 108 RCF::Exception e(RCF::RcfError_SfNoCtor); \ 115 #endif // ! INCLUDE_SF_SFNEW_HPP Base class for all RCF exceptions.
Definition: Exception.hpp:64
Definition: ByteBuffer.hpp:189