GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
sc::Ref< T >(3) MPQC sc::Ref< T >(3)

sc::Ref< T > - A template class that maintains references counts.

#include <ref.h>

Inherits sc::RefBase.


Ref ()
Create a reference to a null object. Ref (T *a)
Create a reference to the object a. Ref (const Ref< T > &a)
Create a reference to the object referred to by a. template<class A > Ref (const Ref< A > &a)
Create a reference to the object referred to by a. ~Ref ()
Delete this reference to the object. T * operator-> () const
Returns the reference counted object. T * pointer () const
Returns a pointer the reference counted object. RefCount * parentpointer () const
Implements the parentpointer pure virtual in the base class. operator T* () const
T & operator* () const
Returns a C++ reference to the reference counted object. int null () const
Return 1 if this is a reference to a null object. int nonnull () const
Return !null(). template<class A > int operator== (const Ref< A > &a) const
A variety of ordering and equivalence operators are provided using the Identity class. template<class A > int operator>= (const Ref< A > &a) const
template<class A > int operator<= (const Ref< A > &a) const
template<class A > int operator> (const Ref< A > &a) const
template<class A > int operator< (const Ref< A > &a) const
template<class A > int operator!= (const Ref< A > &a) const
int compare (const Ref< T > &a) const
Compare two objects returning -1, 0, or 1. void clear ()
Refer to the null object. Ref< T > & operator= (const Ref< T > &c)
Assignment to c. template<class A > Ref< T > & operator= (const Ref< A > &c)
Assignment to c. Ref< T > & operator<< (const RefBase &a)
Assignment to the object that a references using dynamic_cast. Ref< T > & operator<< (RefCount *a)
Assigns to the given base class pointer using dynamic_cast. Ref< T > & operator= (T *cr)
Assignment to cr. void assign_pointer (T *cr)
Assignment to cr. void check_pointer () const
Check the validity of the pointer. void ref_info (std::ostream &os) const
Print information about the reference to os. void warn (const char *s) const
Print a warning concerning the reference.

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.

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().

Compare two objects returning -1, 0, or 1. Similar to the C library routine strcmp.

Return 1 if this is a reference to a null object. Otherwise return 0.

Returns a C++ reference to the reference counted object. The behaviour is undefined if the object is null.

Returns the reference counted object. The behaviour is undefined if the object is null.

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.

Implements the parentpointer pure virtual in the base class.

Implements sc::RefBase.

Generated automatically by Doxygen for MPQC from the source code.
Tue Jun 7 2022 Version 2.3.1

Search for    or go to Top of page |  Section other |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.