Home | Download | Screen shots | Discussion | Documentation |
---|
Collaboration diagram for openvrml::scope_ptr:
Public Member Functions | |
scope_ptr (openvrml::scope *scope=0) throw (std::bad_alloc) | |
Construct. | |
scope_ptr (const scope_ptr &ptr) throw () | |
Construct a copy. | |
operator bool () const throw () | |
Automatic conversion to bool . | |
scope_ptr & | operator= (const scope_ptr &ptr) throw () |
Assignment operator. | |
scope & | operator * () const throw () |
Dereference. | |
scope * | operator-> () const throw () |
Delegate to the scope. | |
scope * | get () const throw () |
Get the scope pointer. | |
void | reset (openvrml::scope *scope=0) throw (std::bad_alloc) |
Reset the scope_ptr to a new scope. | |
Private Member Functions | |
void | dispose () throw () |
Decrement the reference count; destroy the scope if the count drops to zero. | |
Private Attributes | |
scope * | scope_ |
Pointer to a scope. | |
size_t * | count_ |
Pointer to the reference count. | |
Friends | |
bool | operator== (const scope_ptr &lhs, const scope_ptr &rhs) throw () |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const scope_ptr &lhs, const scope_ptr &rhs) throw() |
Compare for inequality. |
scope_ptr is patterned after the Boost shared_ptr, and it works basically the same way. A scope_ptr should be constructed or reset with a scope created with new
(or 0).
|
Construct.
|
|
Construct a copy.
|
|
Get the scope pointer.
|
|
Dereference.
|
|
Automatic conversion to
|
|
Delegate to the scope.
|
|
Assignment operator.
|
|
Reset the scope_ptr to a new scope.
|
|
Compare for inequality.
|