osg::RefPtr< Ref > Class Template Reference
[Field Container]

#include <OSGRefPtr.h>

List of all members.

Public Types

typedef Ref FCPtrType
typedef Ref::StoredObjectType StoredObjectType
typedef const Ref RefPtr::* unspecified_bool_type

Public Member Functions

Constructors


 RefPtr (void)
 RefPtr (const Ref &fcp)
 RefPtr (const RefPtr< Ref > &ptr)
Destructor


virtual ~RefPtr ()
Access


 operator Ref (void) const
Ref::StoredObjectType * operator-> (void) const
Ref::StoredObjectType * getCPtr (void) const
Ref get (void) const
RefPtr< Ref > & operator= (const Ref &fcp)
RefPtr< Ref > & operator= (const RefPtr< Ref > &rcp)
RefPtr< Ref > & operator= (const NullFieldContainerPtr &)
Comparison


bool operator< (const NullFieldContainerPtr &) const
bool operator== (const NullFieldContainerPtr &other) const
bool operator!= (const NullFieldContainerPtr &other) const
bool operator< (const FieldContainerPtr &other) const
bool operator== (const FieldContainerPtr &other) const
bool operator!= (const FieldContainerPtr &other) const
bool operator< (const RefPtr< Ref > &other) const
bool operator== (const RefPtr< Ref > &other) const
bool operator!= (const RefPtr< Ref > &other) const
bool operator! (void) const
 operator unspecified_bool_type () const

Private Member Functions

void setRef (const Ref &ref)

Private Attributes

Ref _ref


Detailed Description

template<class Ref>
class osg::RefPtr< Ref >

Definition at line 59 of file OSGRefPtr.h.


Member Typedef Documentation

template<class Ref>
typedef Ref osg::RefPtr< Ref >::FCPtrType

The full type of the FC Ptr wrapped.

Definition at line 64 of file OSGRefPtr.h.

template<class Ref>
typedef Ref::StoredObjectType osg::RefPtr< Ref >::StoredObjectType

The full type of the object referenced by the wrapped fcptr.

Definition at line 66 of file OSGRefPtr.h.

template<class Ref>
typedef const Ref RefPtr::* osg::RefPtr< Ref >::unspecified_bool_type

Definition at line 67 of file OSGRefPtr.h.


Constructor & Destructor Documentation

template<class Ref>
osg::RefPtr< Ref >::RefPtr ( void   )  [inline]

Definition at line 51 of file OSGRefPtr.inl.

00051                         : _ref(NullFC)
00052 {}

template<class Ref>
osg::RefPtr< Ref >::RefPtr ( const Ref &  fcp  )  [inline, explicit]

Definition at line 55 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, and osg::addRefCP().

00055                                   : _ref(ref)
00056 {
00057     addRefCP(_ref);
00058 }

template<class Ref>
osg::RefPtr< Ref >::RefPtr ( const RefPtr< Ref > &  ptr  )  [inline]

Definition at line 61 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, and osg::addRefCP().

00061                                           : _ref(ptr._ref)
00062 {
00063     addRefCP(_ref);
00064 }

template<class Ref>
osg::RefPtr< Ref >::~RefPtr (  )  [inline, virtual]

Definition at line 67 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, osg::NullFC, and osg::subRefCP().

00068 {
00069     if(_ref != NullFC)
00070         subRefCP(_ref);
00071 }


Member Function Documentation

template<class Ref>
osg::RefPtr< Ref >::operator Ref ( void   )  const [inline]

Definition at line 74 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00075 {
00076     return _ref;
00077 }

template<class Ref>
Ref::StoredObjectType * osg::RefPtr< Ref >::operator-> ( void   )  const [inline]

Definition at line 80 of file OSGRefPtr.inl.

00081 {
00082     return &(*_ref);
00083 }

template<class Ref>
Ref::StoredObjectType * osg::RefPtr< Ref >::getCPtr ( void   )  const [inline]

Definition at line 86 of file OSGRefPtr.inl.

00087 {
00088     return &(*_ref);
00089 }

template<class Ref>
Ref osg::RefPtr< Ref >::get ( void   )  const [inline]

Definition at line 92 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00093 {
00094     return _ref;
00095 }

template<class Ref>
RefPtr< Ref > & osg::RefPtr< Ref >::operator= ( const Ref &  fcp  )  [inline]

Definition at line 98 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::setRef().

00099 {
00100     setRef(fcp);
00101     
00102     return *this;
00103 }

template<class Ref>
RefPtr< Ref > & osg::RefPtr< Ref >::operator= ( const RefPtr< Ref > &  rcp  )  [inline]

Definition at line 106 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, and osg::RefPtr< Ref >::setRef().

00107 {
00108     setRef(rcp._ref);
00109     
00110     return *this;
00111 }

template<class Ref>
RefPtr< Ref > & osg::RefPtr< Ref >::operator= ( const NullFieldContainerPtr  )  [inline]

Definition at line 114 of file OSGRefPtr.inl.

References osg::NullFC, and osg::RefPtr< Ref >::setRef().

00115 {
00116     setRef(NullFC);
00117     
00118     return *this;
00119 }

template<class Ref>
bool osg::RefPtr< Ref >::operator< ( const NullFieldContainerPtr  )  const [inline]

Definition at line 123 of file OSGRefPtr.inl.

00124 {
00125     return false;
00126 }

template<class Ref>
bool osg::RefPtr< Ref >::operator== ( const NullFieldContainerPtr other  )  const [inline]

Definition at line 129 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, and osg::NullFC.

00130 {
00131     return _ref == NullFC;
00132 }

template<class Ref>
bool osg::RefPtr< Ref >::operator!= ( const NullFieldContainerPtr other  )  const [inline]

Definition at line 135 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, and osg::NullFC.

00136 {
00137     return _ref != NullFC;
00138 }

template<class Ref>
bool osg::RefPtr< Ref >::operator< ( const FieldContainerPtr other  )  const [inline]

Definition at line 142 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00143 {
00144     return _ref < other;
00145 }

template<class Ref>
bool osg::RefPtr< Ref >::operator== ( const FieldContainerPtr other  )  const [inline]

Definition at line 148 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00149 {
00150     return _ref == other;
00151 }

template<class Ref>
bool osg::RefPtr< Ref >::operator!= ( const FieldContainerPtr other  )  const [inline]

Definition at line 154 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00155 {
00156     return !(_ref == other);
00157 }

template<class Ref>
bool osg::RefPtr< Ref >::operator< ( const RefPtr< Ref > &  other  )  const [inline]

Definition at line 161 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00162 {
00163     return _ref < other._ref;
00164 }

template<class Ref>
bool osg::RefPtr< Ref >::operator== ( const RefPtr< Ref > &  other  )  const [inline]

Definition at line 167 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00168 {
00169     return _ref == other._ref;
00170 }

template<class Ref>
bool osg::RefPtr< Ref >::operator!= ( const RefPtr< Ref > &  other  )  const [inline]

Definition at line 173 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref.

00174 {
00175     return !(_ref == other._ref);
00176 }

template<class Ref>
bool osg::RefPtr< Ref >::operator! ( void   )  const [inline]

Definition at line 179 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, and osg::NullFC.

00180 {
00181     return _ref == NullFC;
00182 }

template<class Ref>
osg::RefPtr< Ref >::operator unspecified_bool_type (  )  const

template<class Ref>
void osg::RefPtr< Ref >::setRef ( const Ref &  ref  )  [inline, private]

Definition at line 192 of file OSGRefPtr.inl.

References osg::RefPtr< Ref >::_ref, osg::addRefCP(), osg::NullFC, and osg::subRefCP().

Referenced by osg::RefPtr< Ref >::operator=().

00193 {
00194     if(_ref == ref)
00195         return;
00196 
00197     if(_ref != NullFC)
00198         subRefCP(_ref);
00199 
00200     _ref = ref;
00201 
00202     if(_ref != NullFC)
00203         addRefCP(_ref);
00204 }


Member Data Documentation

template<class Ref>
Ref osg::RefPtr< Ref >::_ref [private]


The documentation for this class was generated from the following files:

Generated on Mon Mar 17 11:11:48 2008 for OpenSG by  doxygen 1.5.5