ERC CISST - cisst software

vctDynamicVectorOwner< _elementType > Class Template Reference

#include <vctDynamicVectorOwner.h>

Collaboration diagram for vctDynamicVectorOwner< _elementType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class _elementType>
class vctDynamicVectorOwner< _elementType >

This templated class owns a dynamically allocated array, but does not provide any other operations

Definition at line 37 of file vctDynamicVectorOwner.h.

Public Types

Public Member Functions

Public Attributes

Protected Attributes


Member Typedef Documentation

template<class _elementType>
typedef vctDynamicVectorOwner<_elementType> vctDynamicVectorOwner< _elementType >::ThisType

The type of this owner.

Definition at line 44 of file vctDynamicVectorOwner.h.


Member Function Documentation

template<class _elementType>
void vctDynamicVectorOwner< _elementType >::SetSize ( size_type  size  )  [inline]

Non-preserving resize operation. This method discards of all the current data of the dynamic array and allocates new space in the requested size.

Note:
If the size is unchanged, this method does nothing.

If the size is set to zero, the data pointer is set to null (0).

Definition at line 128 of file vctDynamicVectorOwner.h.

References vctDynamicVectorOwner< _elementType >::Disown(), vctDynamicVectorOwner< _elementType >::Own(), and vctDynamicVectorOwner< _elementType >::Size.

Referenced by vctDynamicVector< svlSample * >::SetSize(), and vctDynamicVectorOwner< _elementType >::vctDynamicVectorOwner().

template<class _elementType>
value_type* vctDynamicVectorOwner< _elementType >::Release ( void   )  [inline]

Release the currently owned data pointer from being owned. Reset this owner's data pointer and size to zero. Return the old data pointer without freeing memory.

Definition at line 138 of file vctDynamicVectorOwner.h.

References vctDynamicVectorOwner< _elementType >::Data, and vctDynamicVectorOwner< _elementType >::Size.

Referenced by vctDynamicVector< svlSample * >::resize(), and vctReturnDynamicVector< _elementType >::vctReturnDynamicVector().

template<class _elementType>
value_type* vctDynamicVectorOwner< _elementType >::Own ( size_type  size,
value_type *  data 
) [inline]

Have this owner take ownership of a new data pointer. Return the old data pointer without freeing memory.

Definition at line 149 of file vctDynamicVectorOwner.h.

References vctDynamicVectorOwner< _elementType >::Data, and vctDynamicVectorOwner< _elementType >::Size.

Referenced by vctDynamicVector< svlSample * >::resize(), vctDynamicVectorOwner< _elementType >::SetSize(), and vctReturnDynamicVector< _elementType >::vctReturnDynamicVector().

template<class _elementType>
void vctDynamicVectorOwner< _elementType >::Disown ( void   )  [inline]

Free the memory allocated for the data pointer. Reset data pointer and size to zero.

Definition at line 159 of file vctDynamicVectorOwner.h.

References vctDynamicVectorOwner< _elementType >::Data, and vctDynamicVectorOwner< _elementType >::Size.

Referenced by vctDynamicVector< svlSample * >::resize(), vctDynamicVectorOwner< _elementType >::SetSize(), and vctDynamicVectorOwner< _elementType >::~vctDynamicVectorOwner().


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu