Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

ScopePtr Class Reference

ScopePtr is a reference-counting smart pointer for Scopes. More...

List of all members.


Public Methods

 ScopePtr (Scope *scope=0)
 ScopePtr (const ScopePtr &scopePtr)
 Copy constructor.

 operator bool () const
ScopePtr & operator= (const ScopePtr &scopePtr)
 Assignment operator.

bool operator== (const ScopePtr &scopePtr) const
Scopeoperator * () const
Scopeoperator-> () const
Scopeget () const
void reset (Scope *scope=0)

Private Methods

void dispose ()

Private Attributes

Scopescope
size_t * count

Detailed Description

ScopePtr is a reference-counting smart pointer for Scopes.

ScopePtr is patterned after the Boost shared_ptr, and it works basically the same way. A ScopePtr should be constructed or reset with a Scope created with new (or 0).

See also:
http://boost.org/libs/smart_ptr/shared_ptr.htm


Constructor & Destructor Documentation

ScopePtr const ScopePtr &    scopePtr
 

Copy constructor.

Parameters:
scopePtr the ScopePtr to copy.

Member Function Documentation

ScopePtr & operator= const ScopePtr &    scopePtr
 

Assignment operator.

Parameters:
scopePtr