Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkSmartPointerBase Class Reference

`#include <vtkSmartPointerBase.h>`

Inheritance diagram for vtkSmartPointerBase:

[legend]
Collaboration diagram for vtkSmartPointerBase:

[legend]
List of all members.

## Detailed Description

Non-templated superclass for vtkSmartPointer.

Date:
  2003/02/12 17:00:51

Revision:
  1.3

vtkSmartPointerBase holds a pointer to a vtkObjectBase or subclass instance and performs one Register/UnRegister pair. This is useful for storing VTK objects in STL containers. This class is not intended to be used directly. Instead, use the vtkSmartPointer class template to automatically perform proper cast operations.

Created by:
  - King, Brad

CVS contributions (if > 5%):
  - King, Brad (100%)

CVS logs (CVSweb):
  - .`cxx` (`/Common/vtkSmartPointerBase.cxx)`
  - .`h` (`/Common/vtkSmartPointerBase.h)`

Definition at line 44 of file vtkSmartPointerBase.h.

## Public Methods

| vtkSmartPointerBase ()
| vtkSmartPointerBase (vtkObjectBase *r)
| vtkSmartPointerBase (const vtkSmartPointerBase &r)
| ~vtkSmartPointerBase ()
vtkSmartPointerBase & | operator= (vtkObjectBase *r)
vtkSmartPointerBase & | operator= (const vtkSmartPointerBase &r)
vtkObjectBase * | GetPointer () const

## Protected Methods

void | Swap (vtkSmartPointerBase &r)
void | Register ()
void | UnRegister ()

## Protected Attributes

vtkObjectBase * | Object

## Constructor & Destructor Documentation

vtkSmartPointerBase::vtkSmartPointerBase | ( |  | ) |

| Initialize smart pointer to NULL.

vtkSmartPointerBase::vtkSmartPointerBase | ( | vtkObjectBase * | r | ) |

| Initialize smart pointer to given object.

vtkSmartPointerBase::vtkSmartPointerBase | ( | const vtkSmartPointerBase & | r | ) |

| Initialize smart pointer with a new reference to the same object referenced by given smart pointer.

vtkSmartPointerBase::~vtkSmartPointerBase | ( |  | ) |

| Destroy smart pointer and remove the reference to its object.

## Member Function Documentation

vtkSmartPointerBase& vtkSmartPointerBase::operator= | ( | vtkObjectBase * | r | ) |

| Assign object to reference. This removes any reference to an old object. Referenced by vtkSmartPointer< T >::operator=().

vtkSmartPointerBase& vtkSmartPointerBase::operator= | ( | const vtkSmartPointerBase & | r | ) |

| Assign object to reference. This removes any reference to an old object. Reimplemented in vtkSmartPointer< T >.

vtkObjectBase* vtkSmartPointerBase::GetPointer | ( |  | ) | const`[inline]`

| Get the contained pointer. Reimplemented in vtkSmartPointer< T >. Definition at line 69 of file vtkSmartPointerBase.h.

void vtkSmartPointerBase::Swap | ( | vtkSmartPointerBase & | r | ) | `[protected]`

void vtkSmartPointerBase::Register | ( |  | ) | `[protected]`

void vtkSmartPointerBase::UnRegister | ( |  | ) | `[protected]`

## Member Data Documentation

vtkObjectBase* vtkSmartPointerBase::Object`[protected]`

| Definition at line 84 of file vtkSmartPointerBase.h. Referenced by vtkSmartPointer< T >::GetPointer(), vtkSmartPointer< T >::operator *(), and vtkSmartPointer< T >::operator->().

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

- Common/vtkSmartPointerBase.h