cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
vctDynamicMatrixOwner< _elementType > Class Template Reference

#include <vctDynamicMatrixOwner.h>

Public Types

enum  { DIMENSION = 2 }
 
typedef vctDynamicMatrixOwner
< value_type > 
ThisType
 
typedef
vctVarStrideMatrixConstIterator
< value_type > 
const_iterator
 
typedef
vctVarStrideMatrixConstIterator
< value_type > 
const_reverse_iterator
 
typedef
vctVarStrideMatrixIterator
< value_type > 
iterator
 
typedef
vctVarStrideMatrixIterator
< value_type > 
reverse_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)
 
pointer Release ()
 
void Disown (void)
 
bool IsColMajor (void) const
 
bool IsRowMajor (void) const
 
bool IsCompact (void) const
 
bool StorageOrder (void) const
 
void SetSize (size_type rows, size_type cols, bool rowMajor)
 
void SetSize (const nsize_type &newSizes, bool rowMajor)
 
pointer Own (size_type rows, size_type cols, bool rowMajor, pointer data)
 
pointer Own (const nsize_type &newSizes, bool rowMajor, pointer data)
 

Protected Attributes

nsize_type SizesMember
 
nstride_type StridesMember
 
bool RowMajor
 
value_type * Data
 

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

template<class _elementType >
typedef vctVarStrideMatrixConstIterator<value_type> vctDynamicMatrixOwner< _elementType >::const_iterator
template<class _elementType >
typedef vctVarStrideMatrixConstIterator<value_type> vctDynamicMatrixOwner< _elementType >::const_reverse_iterator
template<class _elementType >
typedef vctVarStrideMatrixIterator<value_type> vctDynamicMatrixOwner< _elementType >::iterator
template<class _elementType >
typedef vctVarStrideMatrixIterator<value_type> vctDynamicMatrixOwner< _elementType >::reverse_iterator
template<class _elementType >
typedef vctDynamicMatrixOwner<value_type> vctDynamicMatrixOwner< _elementType >::ThisType

Member Enumeration Documentation

template<class _elementType >
anonymous enum
Enumerator
DIMENSION 

Constructor & Destructor Documentation

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

Member Function Documentation

template<class _elementType >
const_iterator vctDynamicMatrixOwner< _elementType >::begin ( void  ) const
inline
template<class _elementType >
iterator vctDynamicMatrixOwner< _elementType >::begin ( void  )
inline
template<class _elementType >
difference_type vctDynamicMatrixOwner< _elementType >::col_stride ( void  ) const
inline
template<class _elementType >
size_type vctDynamicMatrixOwner< _elementType >::cols ( void  ) const
inline
template<class _elementType >
void vctDynamicMatrixOwner< _elementType >::Disown ( void  )
inline

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

template<class _elementType >
const_iterator vctDynamicMatrixOwner< _elementType >::end ( void  ) const
inline
template<class _elementType >
iterator vctDynamicMatrixOwner< _elementType >::end ( void  )
inline
template<class _elementType >
bool vctDynamicMatrixOwner< _elementType >::IsColMajor ( void  ) const
inline
template<class _elementType >
bool vctDynamicMatrixOwner< _elementType >::IsCompact ( void  ) const
inline
template<class _elementType >
bool vctDynamicMatrixOwner< _elementType >::IsRowMajor ( void  ) const
inline
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.
template<class _elementType >
pointer vctDynamicMatrixOwner< _elementType >::Own ( const nsize_type &  newSizes,
bool  rowMajor,
pointer  data 
)
inline
template<class _elementType >
pointer vctDynamicMatrixOwner< _elementType >::Pointer ( index_type  rowIndex,
index_type  colIndex 
)
inline
template<class _elementType >
pointer vctDynamicMatrixOwner< _elementType >::Pointer ( void  )
inline
template<class _elementType >
const_pointer vctDynamicMatrixOwner< _elementType >::Pointer ( index_type  rowIndex,
index_type  colIndex 
) const
inline
template<class _elementType >
const_pointer vctDynamicMatrixOwner< _elementType >::Pointer ( void  ) const
inline
template<class _elementType >
const_reverse_iterator vctDynamicMatrixOwner< _elementType >::rbegin ( void  ) const
inline
template<class _elementType >
reverse_iterator vctDynamicMatrixOwner< _elementType >::rbegin ( void  )
inline
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.

template<class _elementType >
const_reverse_iterator vctDynamicMatrixOwner< _elementType >::rend ( void  ) const
inline
template<class _elementType >
reverse_iterator vctDynamicMatrixOwner< _elementType >::rend ( void  )
inline
template<class _elementType >
difference_type vctDynamicMatrixOwner< _elementType >::row_stride ( void  ) const
inline
template<class _elementType >
size_type vctDynamicMatrixOwner< _elementType >::rows ( void  ) const
inline
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).
template<class _elementType >
void vctDynamicMatrixOwner< _elementType >::SetSize ( const nsize_type &  newSizes,
bool  rowMajor 
)
inline
template<class _elementType >
size_type vctDynamicMatrixOwner< _elementType >::size ( void  ) const
inline
template<class _elementType >
const nsize_type& vctDynamicMatrixOwner< _elementType >::sizes ( void  ) const
inline
template<class _elementType >
bool vctDynamicMatrixOwner< _elementType >::StorageOrder ( void  ) const
inline
template<class _elementType >
const nstride_type& vctDynamicMatrixOwner< _elementType >::strides ( void  ) const
inline
template<class _elementType >
vctDynamicMatrixOwner< _elementType >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType  )
template<class _elementType >
vctDynamicMatrixOwner< _elementType >::VCT_NARRAY_TRAITS_TYPEDEFS ( DIMENSION  )

Member Data Documentation

template<class _elementType >
value_type* vctDynamicMatrixOwner< _elementType >::Data
protected
template<class _elementType >
bool vctDynamicMatrixOwner< _elementType >::RowMajor
protected
template<class _elementType >
nsize_type vctDynamicMatrixOwner< _elementType >::SizesMember
protected
template<class _elementType >
nstride_type vctDynamicMatrixOwner< _elementType >::StridesMember
protected

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