9 #ifndef ThePEG_PtrTraits_H
10 #define ThePEG_PtrTraits_H
66 static pointer
create() {
return new T; }
71 static pointer
create(const_reference t) {
return new T(t); }
76 static void destroy(pointer tp) {
delete tp; }
82 static pointer
DynamicCast(R * r) {
return dynamic_cast<pointer
>(r); }
87 static pointer
ConstCast(
const T * t) {
return const_cast<pointer
>(t); }
92 static pointer
PtrCast(T * t) {
return t; }
97 static const bool reference_counted =
false;
127 static pointer
create() {
return new T; }
132 static pointer
create(const_reference t) {
return new T(t); }
137 static void destroy(pointer tp) {
delete tp; }
144 return dynamic_cast<const_pointer
>(r);
150 static const_pointer
ConstCast(
const T * r) {
return r; }
155 static const_pointer
PtrCast(
const T * t) {
return t; }
160 static const bool reference_counted =
false;
167 template <
class T1,
class T2>
174 template <
class T1,
class T2>
180 template <
typename Ptr>
186 template <
typename Ptr>
194 template <
typename T>
202 template <
typename T>
210 template <
typename TPtr,
typename T>
218 template <
typename TPtr,
typename T>