Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ptr File Reference

#include <nmstl/thread>
#include <nmstl/atomic>

Compounds

class  ptr
 A threadsafe reference-counting smart pointer class. More...


Functions

template<typename T1> string to_string (const ptr< T1 > &t)
template<typename T1> ostream & operator<< (ostream &out, const ptr< T1 > &t)
template<typename T1, typename T2> ptr< T1 > static_cast_ptr (ptr< T2 > &p2)
 Statically casts a ptr of type T2 to type T1, returning the resultant smart pointer (sharing this object's reference count).

template<typename T1, typename T2> ptr< T1 > dynamic_cast_ptr (ptr< T2 > &p2)
 Dynamically casts a ptr of type T2 to type T1, returning the resultant smart pointer (sharing this object's reference count).


Variables

 NMSTL_NAMESPACE_BEGIN
 NMSTL_NAMESPACE_END

Function Documentation

template<typename T1, typename T2>
ptr<T1> dynamic_cast_ptr ptr< T2 > &    p2
 

Dynamically casts a ptr of type T2 to type T1, returning the resultant smart pointer (sharing this object's reference count).

If a T2* cannot be cast to a T1*, then a null smart pointer is returned and the object's reference count is not incremented.

template<typename T1>
ostream& operator<< ostream &    out,
const ptr< T1 > &    t
 

template<typename T1, typename T2>
ptr<T1> static_cast_ptr ptr< T2 > &    p2
 

Statically casts a ptr of type T2 to type T1, returning the resultant smart pointer (sharing this object's reference count).

template<typename T1>
string to_string const ptr< T1 > &    t
 


Variable Documentation

NMSTL_NAMESPACE_BEGIN
 

NMSTL_NAMESPACE_END
 


Generated on Fri Dec 20 13:35:10 2002 for NMSTL