lava::NodePtr< L, F > Class Template Reference

The NodePtr class provides automatic reference-counting for Node pointers. More...

#include <lavabdd.h>

List of all members.

Public Member Functions

 NodePtr (Node *node)
 Constructor. It is not explicit so Node* values (such as NULL) will be converted automatically.
 ~NodePtr ()
 Destructor.
 NodePtr (const NodePtr &other)
 Copy constructor.
NodePtroperator= (const NodePtr &other)
 Assignment operator.
Nodeoperator* () const
 Pointer dereference. Throws std::logic_error on NULL access.
Nodeoperator-> () const
 Pointer member access operator. Throws std::logic_error on NULL access.
Nodeget_ptr () const
 Returns the encapsulated pointer. You should not use this unless you know what you're doing. Wrong use of this will mess up reference counting.
bool operator== (const NodePtr &other) const
 Pointer equality.
bool operator!= (const NodePtr &other) const
 Pointer inequality.
 operator bool () const
 Conversion to bool. Returns true iff encapsulated pointer is non-NULL.
void nullify ()
 Releases the encapsulated pointer and sets it to NULL.
void grab (Node *node)
 Releases the current encapsulated pointer and grabs a new one.

Detailed Description

template<class L, int F>
class lava::NodePtr< L, F >

The NodePtr class provides automatic reference-counting for Node pointers.

It encapsulates a Node* variable and can be used exactly as such, thanks to the overloaded operator definitions.


The documentation for this class was generated from the following file:
Generated on Tue Feb 23 19:27:52 2010 for LaVaBDD by  doxygen 1.6.3