64 template <
class T = RObject>
91 :
GCEdge<T>(cloneOrSelf(pattern))
113 static T* cloneOrSelf(T*);
117 namespace ElementTraits {
119 struct DetachReferents<RHandle<T> >
120 : std::unary_function<T, void> {
128 struct HasReferents<RHandle<T> > : boost::mpl::true_
132 struct MustConstruct<RHandle<T> > : boost::mpl::true_
136 struct MustDestruct<RHandle<T> > : boost::mpl::true_
140 struct Serialize<RHandle<T> > {
141 template <
class Archive>
142 void operator()(Archive& ar, RHandle<T>& item)
149 class VisitReferents<RHandle<T> >
150 :
public std::unary_function<T, void> {
162 GCNode::const_visitor* m_v;
166 struct NAFunc<RHandle<T> > {
169 static RHandle<T> na;
175 struct IsNA<RHandle<T> > {
190 T* t = pattern ?
static_cast<T*
>(pattern->clone()) : 0;
191 return (t ? t : pattern);
194 #endif // RHANDLE_HPP