![]() |
![]()
| ![]() |
![]()
NAMEsc::Ref< T > - A template class that maintains references counts. SYNOPSIS#include <ref.h> Inherits sc::RefBase. Public Member FunctionsRef ()
Public Member Functions inherited from sc::RefBase
Additional Inherited MembersProtected Member Functions inherited from sc::RefBase
Detailed Descriptiontemplate<class T>class sc::Ref< T >"A template class that maintains references counts. Several of these operations can cause a reference to an object to be replaced by a reference to a different object. If a reference to a nonnull object is eliminated, the object's reference count is decremented and the object is deleted if the reference count becomes zero. There also may be a to convert to T*, where T is the type of the object which Ref references. Some compilers have bugs that prevent the use of operator T*(). The pointer() member should be used instead. Constructor & Destructor Documentationtemplate<class T > sc::Ref< T >::~Ref () [inline]Delete this reference to the object. Decrement the object's reference count and delete the object if the count is zero. References sc::Ref< T >::clear(). Member Function Documentationtemplate<class T > int sc::Ref< T >::compare (const Ref< T > & a) const [inline]Compare two objects returning -1, 0, or 1. Similar to the C library routine strcmp. template<class T > int sc::Ref< T >::null () const [inline]Return 1 if this is a reference to a null object. Otherwise return 0. template<class T > T & sc::Ref< T >::operator* () const [inline]Returns a C++ reference to the reference counted object. The behaviour is undefined if the object is null. template<class T > T * sc::Ref< T >::operator-> () const [inline]Returns the reference counted object. The behaviour is undefined if the object is null. template<class T > Ref< T > & sc::Ref< T >::operator<< (RefCount * a) [inline]Assigns to the given base class pointer using dynamic_cast. If the dynamic_cast fails and the argument is nonnull and has a reference count of zero, then it is deleted. template<class T > RefCount * sc::Ref< T >::parentpointer () const [inline], [virtual]Implements the parentpointer pure virtual in the base class. Implements sc::RefBase. AuthorGenerated automatically by Doxygen for MPQC from the source code.
|