Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


pointer.hh File Reference

Smart pointer class interface. More...

Namespaces

Classes

Smart pointer C++-style casting functions


Detailed Description

Smart pointer class interface.

Provides a reference-counted-object aware smart pointer class.


Function Documentation

template<typename To, typename From>
Pointer<To> cast_const const Pointer< From > &  from  )  [inline]
 

Removes the const qualifier from a managed const dumb pointer.

Parameters:
from A Pointer that manages a const dumb pointer.
Returns:
A new Pointer that manages the non-const dumb pointer.
Calls const_cast on the dumb pointer and returns the non-const pointer as a new Pointer.

template<typename To, typename From>
Pointer<To> cast_dynamic const Pointer< From > &  from  )  [inline]
 

Casts a managed polymophic dumb pointer down or across its inheritance heirarchy.

Parameters:
from A Pointer managing a polymophic dumb pointer of type From.
Returns:
A new Pointer managing the dumb pointer as a base or sibling pointer of type To.
Calls dynmaic_cast to safely cast a managed polymophic dumb pointer of type From to a base, derived or sibling class pointer of type To.

template<typename To, typename From>
Pointer<To> cast_static const Pointer< From > &  from  )  [inline]
 

Casts a managed dumb pointer to a pointer to a related type.

Parameters:
from A Pointer managing a dumb pointer of type From.
Returns:
A new Pointer managing the dumb pointer as a pointer of type To.
Calls static_cast to cast a dumb pointer of type From to a pointer of type To.
Xfce Foundation Classes


Copyright © 2004-2005 The XFC Development Team XFC 4.3