cisst-saw
Loading...
Searching...
No Matches
vctDynamicMatrixOwner< _elementType > Class Template Reference

#include <vctDynamicMatrixOwner.h>

Public Types

enum  { DIMENSION = 2 }
typedef vctDynamicMatrixOwner< value_typeThisType
typedef vctVarStrideMatrixConstIterator< value_typeconst_iterator
typedef vctVarStrideMatrixConstIterator< value_typeconst_reverse_iterator
typedef vctVarStrideMatrixIterator< value_typeiterator
typedef vctVarStrideMatrixIterator< value_typereverse_iterator

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 VCT_NARRAY_TRAITS_TYPEDEFS (DIMENSION)
 vctDynamicMatrixOwner ()
 vctDynamicMatrixOwner (const nsize_type &newSizes, bool rowMajor=VCT_DEFAULT_STORAGE)
 vctDynamicMatrixOwner (size_type rows, size_type cols, bool rowMajor=VCT_DEFAULT_STORAGE)
 ~vctDynamicMatrixOwner ()
size_type size (void) const
const nsize_type & sizes (void) const
size_type rows (void) const
size_type cols (void) const
const nstride_type & strides (void) const
difference_type row_stride (void) const
difference_type col_stride (void) const
pointer Pointer (index_type rowIndex, index_type colIndex)
pointer Pointer (void)
const_pointer Pointer (index_type rowIndex, index_type colIndex) const
const_pointer Pointer (void) const
const_iterator begin (void) const
const_iterator end (void) const
iterator begin (void)
iterator end (void)
const_reverse_iterator rbegin (void) const
const_reverse_iterator rend (void) const
reverse_iterator rbegin (void)
reverse_iterator rend (void)
void SetSize (size_type rows, size_type cols, bool rowMajor)
void SetSize (const nsize_type &newSizes, bool rowMajor)
pointer Release ()
pointer Own (size_type rows, size_type cols, bool rowMajor, pointer data)
pointer Own (const nsize_type &newSizes, bool rowMajor, pointer data)
void Disown (void)
bool IsColMajor (void) const
bool IsRowMajor (void) const
bool IsCompact (void) const
bool StorageOrder (void) const

Protected Attributes

nsize_type SizesMember
nstride_type StridesMember
bool RowMajor
value_typeData

Detailed Description

template<class _elementType>
class vctDynamicMatrixOwner< _elementType >

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

Member Typedef Documentation

◆ const_iterator

template<class _elementType>
typedef vctVarStrideMatrixConstIterator<value_type> vctDynamicMatrixOwner< _elementType >::const_iterator

◆ const_reverse_iterator

template<class _elementType>
typedef vctVarStrideMatrixConstIterator<value_type> vctDynamicMatrixOwner< _elementType >::const_reverse_iterator

◆ iterator

template<class _elementType>
typedef vctVarStrideMatrixIterator<value_type> vctDynamicMatrixOwner< _elementType >::iterator

◆ reverse_iterator

template<class _elementType>
typedef vctVarStrideMatrixIterator<value_type> vctDynamicMatrixOwner< _elementType >::reverse_iterator

◆ ThisType

template<class _elementType>
typedef vctDynamicMatrixOwner<value_type> vctDynamicMatrixOwner< _elementType >::ThisType

Member Enumeration Documentation

◆ anonymous enum

template<class _elementType>
anonymous enum
Enumerator
DIMENSION 

Constructor & Destructor Documentation

◆ vctDynamicMatrixOwner() [1/3]

template<class _elementType>
vctDynamicMatrixOwner< _elementType >::vctDynamicMatrixOwner ( )
inline

◆ vctDynamicMatrixOwner() [2/3]

template<class _elementType>
vctDynamicMatrixOwner< _elementType >::vctDynamicMatrixOwner ( const nsize_type & newSizes,
bool rowMajor = VCT_DEFAULT_STORAGE )
inline

◆ vctDynamicMatrixOwner() [3/3]

template<class _elementType>
vctDynamicMatrixOwner< _elementType >::vctDynamicMatrixOwner ( size_type rows,
size_type cols,
bool rowMajor = VCT_DEFAULT_STORAGE )
inline

◆ ~vctDynamicMatrixOwner()

template<class _elementType>
vctDynamicMatrixOwner< _elementType >::~vctDynamicMatrixOwner ( )
inline

Member Function Documentation

◆ begin() [1/2]

template<class _elementType>
iterator vctDynamicMatrixOwner< _elementType >::begin ( void )
inline

◆ begin() [2/2]

template<class _elementType>
const_iterator vctDynamicMatrixOwner< _elementType >::begin ( void ) const
inline

◆ col_stride()

template<class _elementType>
difference_type vctDynamicMatrixOwner< _elementType >::col_stride ( void ) const
inline

◆ cols()

template<class _elementType>
size_type vctDynamicMatrixOwner< _elementType >::cols ( void ) const
inline

◆ Disown()

template<class _elementType>
void vctDynamicMatrixOwner< _elementType >::Disown ( void )
inline

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

◆ end() [1/2]

template<class _elementType>
iterator vctDynamicMatrixOwner< _elementType >::end ( void )
inline

◆ end() [2/2]

template<class _elementType>
const_iterator vctDynamicMatrixOwner< _elementType >::end ( void ) const
inline

◆ IsColMajor()

template<class _elementType>
bool vctDynamicMatrixOwner< _elementType >::IsColMajor ( void ) const
inline

◆ IsCompact()

template<class _elementType>
bool vctDynamicMatrixOwner< _elementType >::IsCompact ( void ) const
inline

◆ IsRowMajor()

template<class _elementType>
bool vctDynamicMatrixOwner< _elementType >::IsRowMajor ( void ) const
inline

◆ Own() [1/2]

template<class _elementType>
pointer vctDynamicMatrixOwner< _elementType >::Own ( const nsize_type & newSizes,
bool rowMajor,
pointer data )
inline

◆ Own() [2/2]

template<class _elementType>
pointer vctDynamicMatrixOwner< _elementType >::Own ( size_type rows,
size_type cols,
bool rowMajor,
pointer data )
inline

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

Note
This method returns a pointer to the previously owned memory block but doesn't tell if the old block was row or column major nor the size of the block.

◆ Pointer() [1/4]

template<class _elementType>
pointer vctDynamicMatrixOwner< _elementType >::Pointer ( index_type rowIndex,
index_type colIndex )
inline

◆ Pointer() [2/4]

template<class _elementType>
const_pointer vctDynamicMatrixOwner< _elementType >::Pointer ( index_type rowIndex,
index_type colIndex ) const
inline

◆ Pointer() [3/4]

template<class _elementType>
pointer vctDynamicMatrixOwner< _elementType >::Pointer ( void )
inline

◆ Pointer() [4/4]

template<class _elementType>
const_pointer vctDynamicMatrixOwner< _elementType >::Pointer ( void ) const
inline

◆ rbegin() [1/2]

template<class _elementType>
reverse_iterator vctDynamicMatrixOwner< _elementType >::rbegin ( void )
inline

◆ rbegin() [2/2]

template<class _elementType>
const_reverse_iterator vctDynamicMatrixOwner< _elementType >::rbegin ( void ) const
inline

◆ Release()

template<class _elementType>
pointer vctDynamicMatrixOwner< _elementType >::Release ( )
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.

◆ rend() [1/2]

template<class _elementType>
reverse_iterator vctDynamicMatrixOwner< _elementType >::rend ( void )
inline

◆ rend() [2/2]

template<class _elementType>
const_reverse_iterator vctDynamicMatrixOwner< _elementType >::rend ( void ) const
inline

◆ row_stride()

template<class _elementType>
difference_type vctDynamicMatrixOwner< _elementType >::row_stride ( void ) const
inline

◆ rows()

template<class _elementType>
size_type vctDynamicMatrixOwner< _elementType >::rows ( void ) const
inline

◆ SetSize() [1/2]

template<class _elementType>
void vctDynamicMatrixOwner< _elementType >::SetSize ( const nsize_type & newSizes,
bool rowMajor )
inline

◆ SetSize() [2/2]

template<class _elementType>
void vctDynamicMatrixOwner< _elementType >::SetSize ( size_type rows,
size_type cols,
bool rowMajor )
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 storage order and the sizes (both rows and columns) are unchanged, this method does nothing.
If the size is set to zero, the data pointer is set to null (0).

◆ size()

template<class _elementType>
size_type vctDynamicMatrixOwner< _elementType >::size ( void ) const
inline

◆ sizes()

template<class _elementType>
const nsize_type & vctDynamicMatrixOwner< _elementType >::sizes ( void ) const
inline

◆ StorageOrder()

template<class _elementType>
bool vctDynamicMatrixOwner< _elementType >::StorageOrder ( void ) const
inline

◆ strides()

template<class _elementType>
const nstride_type & vctDynamicMatrixOwner< _elementType >::strides ( void ) const
inline

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<class _elementType>
vctDynamicMatrixOwner< _elementType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType )

◆ VCT_NARRAY_TRAITS_TYPEDEFS()

template<class _elementType>
vctDynamicMatrixOwner< _elementType >::VCT_NARRAY_TRAITS_TYPEDEFS ( DIMENSION )

Member Data Documentation

◆ Data

template<class _elementType>
value_type* vctDynamicMatrixOwner< _elementType >::Data
protected

◆ RowMajor

template<class _elementType>
bool vctDynamicMatrixOwner< _elementType >::RowMajor
protected

◆ SizesMember

template<class _elementType>
nsize_type vctDynamicMatrixOwner< _elementType >::SizesMember
protected

◆ StridesMember

template<class _elementType>
nstride_type vctDynamicMatrixOwner< _elementType >::StridesMember
protected

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