18 #ifndef INCLUDE_SF_SFNEW_HPP 19 #define INCLUDE_SF_SFNEW_HPP 23 #include <RCF/Tools.hpp> 25 #include <RCF/Exception.hpp> 26 #include <RCF/TypeTraits.hpp> 32 template<
typename T,
typename R>
33 R sfNewImpl(T*, R*, Archive &, RCF::TrueType *)
40 template<
typename T,
typename R>
41 R sfNewImpl(T*, R*, Archive &, RCF::FalseType *)
46 template<
typename T,
typename R>
47 R sfNew(T*t, R*r, Archive &ar)
49 typedef typename std::is_abstract<T>::type type;
50 return sfNewImpl(t, r, ar, (type *) NULL);
53 template<
typename T,
unsigned int N,
typename R>
54 R sfNew(T (*)[N], R*, Archive &)
64 #define SF_CTOR(type, ctor) \ 65 inline type *sfNew(type*, type **, SF::Archive &) \ 72 #define SF_CUSTOM_CTOR(type, func) \ 73 inline type *sfNew(type*, type **, SF::Archive & ar) \ 82 #define SF_NO_CTOR(type) \ 83 inline type *sfNew(type*, type **, SF::Archive &) \ 85 RCF::Exception e(RCF::RcfError_SfNoCtor); \ 92 #define SF_NO_CTOR_T1(type) \ 93 template<typename T> \ 94 inline type<T> *sfNew(type<T>*, type<T> **, SF::Archive &) \ 96 RCF::Exception e(RCF::RcfError_SfNoCtor); \ 103 #define SF_NO_CTOR_T2(type) \ 104 template<typename T, typename U> \ 105 inline type<T,U> *sfNew(type<T,U>*, type<T,U> **, SF::Archive &) \ 107 RCF::Exception e(RCF::RcfError_SfNoCtor); \ 114 #endif // ! INCLUDE_SF_SFNEW_HPP Base class for all RCF exceptions.
Definition: Exception.hpp:67
Definition: ByteBuffer.hpp:188