| Home | Download | Screen shots | Discussion | Documentation |
|---|
Public Member Functions | |
| node_ptr (node *node=0) throw (std::bad_alloc) | |
| Construct. | |
| node_ptr (const node_ptr &ptr) throw () | |
| Construct a copy. | |
| ~node_ptr () throw () | |
| Destructor. | |
| operator bool () const throw () | |
| Automatic conversion to bool. | |
| node_ptr & | operator= (const node_ptr &ptr) throw () |
| Assignment operator. | |
| node & | operator * () const throw () |
| Dereference operator. | |
| node * | operator-> () const throw () |
| Access a method of the node. | |
| node * | get () const throw () |
| Get a raw pointer to the node. | |
| void | reset (node *node=0) throw (std::bad_alloc) |
| Reset the node_ptr to point to a different node. | |
| void | swap (node_ptr &ptr) throw () |
Swap the values of the node_ptr and ptr. | |
Static Public Attributes | |
| static const node_ptr | self |
| Special value used when initializing a script_node. | |
Private Member Functions | |
| void | dispose () throw () |
| Relinquish ownership of the node. | |
| void | share (std::map< node *, size_t >::value_type *count_ptr) throw () |
| Share ownership of a node. | |
Private Attributes | |
| std::map< node *, size_t > ::value_type * | count_ptr |
| Pointer to an entry in count_map. | |
Friends | |
| class | script_node |
| Script nodes can be self-referential, so node_ptr works some special magic. | |
| bool | operator== (const node_ptr &lhs, const node_ptr &rhs) throw () |
| Compare for equality. | |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator!= (const node_ptr &lhs, const node_ptr &rhs) throw() |
| Compare for inequality. | |
| openvrml::node_ptr::node_ptr | ( | node * | node = 0 |
) | throw (std::bad_alloc) [explicit] |
| openvrml::node_ptr::node_ptr | ( | const node_ptr & | ptr | ) | throw () |
Construct a copy.
| ptr |
| openvrml::node_ptr::~node_ptr | ( | ) | throw () [inline] |
Destructor.
| openvrml::node_ptr::operator bool | ( | ) | const throw () [inline] |
Automatic conversion to bool.
Assignment operator.
| ptr |
| node & openvrml::node_ptr::operator * | ( | ) | const throw () [inline] |
| node * openvrml::node_ptr::get | ( | ) | const throw () [inline] |
| void openvrml::node_ptr::reset | ( | node * | node = 0 |
) | throw (std::bad_alloc) |
| void openvrml::node_ptr::swap | ( | node_ptr & | ptr | ) | throw () [inline] |
Swap the values of the node_ptr and ptr.
| void openvrml::node_ptr::dispose | ( | ) | throw () [private] |
Relinquish ownership of the node.
Decrement the reference count; if it drops to zero, call node::shutdown on the node, delete the node, and remove its entry from the count map.
| void openvrml::node_ptr::share | ( | std::map< node *, size_t >::value_type * | count_ptr | ) | throw () [private] |
openvrml::node_ptr::script_node [friend] |
Script nodes can be self-referential, so node_ptr works some special magic.
Compare for equality.
| lhs | left-hand operand. | |
| rhs | right-hand operand. |
true if lhs and rhs point to the same node; false otherwise. Compare for inequality.
| lhs | left-hand operand. | |
| rhs | right-hand operand. |
true if lhs and rhs point to different nodes; false otherwise.
std::map< node *, size_t >::value_type * openvrml::node_ptr::count_ptr [private] |
Pointer to an entry in count_map.
For internal use only.
const node_ptr openvrml::node_ptr::self [static] |
Special value used when initializing a script_node.
One should never attempt to dereference this value. It is useful only for comparison.