Logo Search packages:      
Sourcecode: gdcm version File versions  Download package

Public Member Functions | Private Member Functions | Private Attributes

gdcm::SmartPointer< ObjectType > Class Template Reference

Class for Smart Pointer. More...

#include <gdcmSmartPointer.h>

Inheritance diagram for gdcm::SmartPointer< ObjectType >:
Inheritance graph
[legend]
Collaboration diagram for gdcm::SmartPointer< ObjectType >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

ObjectType * GetPointer () const
 Explicit function to retrieve the pointer.
 operator ObjectType * () const
 Return pointer to object.
ObjectType & operator* () const
ObjectType * operator-> () const
 Overload operator ->
SmartPointeroperator= (ObjectType const &r)
SmartPointeroperator= (SmartPointer const &r)
 Overload operator assignment.
SmartPointeroperator= (ObjectType *r)
 Overload operator assignment.
 SmartPointer (ObjectType const &p)
 SmartPointer (const SmartPointer< ObjectType > &p)
 SmartPointer (ObjectType *p)

Private Member Functions

void Register ()
void UnRegister ()

Private Attributes

ObjectType * Pointer

Detailed Description

template<class ObjectType>
class gdcm::SmartPointer< ObjectType >

Class for Smart Pointer.

Will only work for subclass of gdcm::Object See tr1/shared_ptr for a more general approach (not invasive) include <tr1/memory> { shared_ptr<Bla> b(new Bla); }

Note:
Class partly based on post by Bill Hubauer: http://groups.google.com/group/comp.lang.c++/msg/173ddc38a827a930
See also:
http://www.davethehat.com/articles/smartp.htm

and itk::SmartPointer

Definition at line 40 of file gdcmSmartPointer.h.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index