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

Dynamic vector referencing existing memory. More...

#include <vctDynamicVectorRef.h>

Inheritance diagram for vctDynamicVectorRef< _elementType >:
vctDynamicVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType > vctDynamicConstVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType >

Public Types

typedef vctDynamicVectorRef< _elementType > ThisType
typedef vctDynamicVectorRefOwner< _elementType > VectorOwnerType
typedef vctDynamicVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType > BaseType
typedef BaseType::CopyType CopyType
typedef VectorOwnerType::iterator iterator
typedef VectorOwnerType::const_iterator const_iterator
typedef VectorOwnerType::reverse_iterator reverse_iterator
typedef VectorOwnerType::const_reverse_iterator const_reverse_iterator
Public Types inherited from vctDynamicVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType >
typedef vctDynamicVectorBase ThisType
typedef vctDynamicConstVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType > BaseType
typedef vctDynamicVectorRefOwner< _elementType > VectorOwnerType
typedef BaseType::iterator iterator
typedef BaseType::reverse_iterator reverse_iterator
typedef BaseType::const_iterator const_iterator
typedef BaseType::const_reverse_iterator const_reverse_iterator
typedef BaseType::CopyType CopyType
typedef BaseType::VectorValueType VectorValueType
typedef class cmnTypeTraits< value_typeTypeTraits
typedef TypeTraits::VaArgPromotion ElementVaArgPromotion

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 vctDynamicVectorRef ()
 vctDynamicVectorRef (const ThisType &other)
 vctDynamicVectorRef (size_type size, value_type *data, stride_type stride=1)
template<size_type __size, stride_type __stride, class __dataPtrType>
 vctDynamicVectorRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition=0)
template<size_type __size, stride_type __stride, class __dataPtrType>
 vctDynamicVectorRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition, size_type length)
template<class __vectorOwnerType>
 vctDynamicVectorRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
 vctDynamicVectorRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector, size_type startPosition, size_type length)
void SetRef (size_type size, pointer data, stride_type stride=1)
template<size_type __size, stride_type __stride, class __dataPtrType>
void SetRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition=0)
template<size_type __size, stride_type __stride, class __dataPtrType>
void SetRef (vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > &otherVector, size_type startPosition, size_type length) CISST_THROW(std
template<class __vectorOwnerType>
void SetRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector)
template<class __vectorOwnerType>
void SetRef (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector, size_type startPosition, size_type length) CISST_THROW(std
ThisTypeoperator= (const ThisType &other)
ThisTypeoperator= (const vctDynamicConstVectorRef< value_type > &other)
template<class __vectorOwnerType, typename __elementType>
ThisTypeoperator= (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType>
ThisTypeoperator= (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other)
ThisTypeoperator= (const value_type &value)
void DeSerializeRaw (std::istream &inputStream) CISST_THROW(std
Public Member Functions inherited from vctDynamicVectorBase< vctDynamicVectorRefOwner< _elementType >, _elementType >
 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
iterator begin (void)
iterator end (void)
reverse_iterator rbegin (void)
reverse_iterator rend (void)
const_iterator begin (void) const
const_iterator end (void) const
const_reverse_iterator rbegin (void) const
const_reverse_iterator rend (void) const
reference operator[] (index_type index)
const_reference operator[] (index_type index) const
const VectorOwnerTypeOwner (void) const
VectorOwnerTypeOwner (void)
pointer Pointer (index_type index=0)
const_pointer Pointer (index_type index=0) const
reference at (index_type index) CISST_THROW(std
const_reference at (index_type index) const CISST_THROW(std
reference operator() (index_type index) CISST_THROW(std
const_reference operator() (index_type index) const CISST_THROW(std
reference Element (index_type index)
const_reference Element (index_type index) const
value_type SetAll (const value_type value)
bool Zeros (void)
ThisTypeAssign (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other)
ThisTypeAssign (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &other, size_type length, size_type startPositionThis=0, size_type startPositionOther=0)
ThisTypeAssign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
ThisTypeoperator= (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
ThisTypeAssign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other)
ThisTypeForceAssign (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &other)
ThisTypeForceAssign (const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > &other)
bool FastCopyOf (const vctDynamicConstVectorBase< __vectorOwnerType, value_type > &source, bool performSafetyChecks=true) CISST_THROW(std
bool FastCopyOf (const vctFixedSizeConstVectorBase< __size, __stride, value_type, __dataPtrType > &source, bool performSafetyChecks=true) CISST_THROW(std
ThisTypeAssign (const value_type *elements)
ThisTypeAssign (value_type element0, value_type element1,...) CISST_THROW(std
ThisTypeConcatenationOf (const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > &otherVector, __elementType lastElement)
value_typeX (void)
const value_typeX (void) const
value_typeY (void)
const value_typeY (void) const
value_typeZ (void)
const value_typeZ (void) const
value_typeW (void)
const value_typeW (void) const
vctDynamicVectorRef< _elementType > XY (void)
vctDynamicVectorRef< _elementType > XZ (void)
vctDynamicVectorRef< _elementType > XW (void)
vctDynamicVectorRef< _elementType > YZ (void)
vctDynamicVectorRef< _elementType > YW (void)
vctDynamicVectorRef< _elementType > ZW (void)
vctDynamicConstVectorRef< _elementType > XY (void) const
vctDynamicConstVectorRef< _elementType > XZ (void) const
vctDynamicConstVectorRef< _elementType > XW (void) const
vctDynamicConstVectorRef< _elementType > YZ (void) const
vctDynamicConstVectorRef< _elementType > YW (void) const
vctDynamicConstVectorRef< _elementType > ZW (void) const
vctDynamicVectorRef< _elementType > XYZ (void)
vctDynamicVectorRef< _elementType > YZW (void)
vctDynamicConstVectorRef< _elementType > XYZ (void) const
vctDynamicConstVectorRef< _elementType > YZW (void) const
vctDynamicVectorRef< _elementType > XYZW (void)
vctDynamicConstVectorRef< _elementType > XYZW (void) const
vctDynamicVectorRef< _elementType > Ref (const size_type size, const size_type startPosition=0) CISST_THROW(std
vctDynamicConstVectorRef< _elementType > Ref (const size_type size, const size_type startPosition=0) const CISST_THROW(std
void SelectFrom (const vctDynamicConstVectorBase< __inputVectorOwner, _elementType > &input, const vctDynamicConstVectorBase< __indexVectorOwner, index_type > &index)
void CrossProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &inputVector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &inputVector2)
ThisTypeSumOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeDifferenceOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeElementwiseProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeElementwiseRatioOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeElementwiseMinOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeElementwiseMaxOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeElementwiseClippedInOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &boundVector, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector)
ThisTypeAdd (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeSubtract (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeElementwiseMultiply (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeElementwiseDivide (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeElementwiseMin (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeElementwiseMax (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeElementwiseClipAbove (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &upperBoundVector)
ThisTypeElementwiseClipBelow (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &lowerBoundVector)
ThisTypeElementwiseClipIn (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &boundVector)
ThisTypeoperator+= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeoperator-= (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeSwapElementsWith (vctDynamicVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeSumOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
ThisTypeDifferenceOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
ThisTypeProductOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
ThisTypeRatioOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type scalar)
ThisTypeClippedAboveOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type upperBound)
ThisTypeClippedBelowOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type lowerBound)
ThisTypeClippedInOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector, const value_type bound)
ThisTypeSumOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeDifferenceOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeProductOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeRatioOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeClippedAboveOf (const value_type upperBound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeClippedBelowOf (const value_type lowerBound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeClippedInOf (const value_type bound, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &vector)
ThisTypeAdd (const value_type scalar)
ThisTypeSubtract (const value_type scalar)
ThisTypeMultiply (const value_type scalar)
ThisTypeDivide (const value_type scalar)
ThisTypeClipAbove (const value_type upperBound)
ThisTypeClipBelow (const value_type lowerBound)
ThisTypeClipIn (const value_type bound)
ThisTypeoperator+= (const value_type scalar)
ThisTypeoperator-= (const value_type scalar)
ThisTypeoperator*= (const value_type scalar)
ThisTypeoperator/= (const value_type scalar)
ThisTypeAddProductOf (const value_type scalar, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeAddElementwiseProductOf (const vctDynamicConstVectorBase< __vectorOwnerType1, _elementType > &vector1, const vctDynamicConstVectorBase< __vectorOwnerType2, _elementType > &vector2)
ThisTypeProductOf (const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix, const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &inputVector)
ThisTypeProductOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &inputVector, const vctDynamicConstMatrixBase< __matrixOwnerType, _elementType > &inputMatrix)
ThisTypeAbsOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeNegationOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeFloorOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeCeilOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector)
ThisTypeNormalizedOf (const vctDynamicConstVectorBase< __vectorOwnerType, _elementType > &otherVector) CISST_THROW(std
ThisTypeAbsSelf (void)
ThisTypeNegationSelf (void)
ThisTypeFloorSelf (void)
ThisTypeCeilSelf (void)
ThisTypeNormalizedSelf (void) CISST_THROW(std

Detailed Description

template<class _elementType>
class vctDynamicVectorRef< _elementType >

Dynamic vector referencing existing memory.

The class vctDynamicVectorRef allows to create a vector overlaying an existing block of memory. It can be used to manipulate a container created by another toolkit (i.e. OpenGL, vtk, ...) or a cisstVector container using different parameters (different size, storage order or stride).

To setup the overlay, one can use either the constructors or the SetRef methods. When used with a cisst container, the SetRef methods can infer some of the memory layout information (pointer on first element, size, stride). When used to overlay existing memory referenced by a pointer, the user has to provide all the required information. In any case, the Ref object doesn't allocate nor free memory.

For example to manipulate the first five elements of a vector, one can do:

vctDynamicVector<double> wholeVector(10);
vctRandom(wholeVector, -10.0, 10.0);
first5.SetRef(wholeVector, 0, 5);
first5.SetAll(5.0);
value_type SetAll(const value_type value)
Definition vctDynamicVectorBase.h:209
Definition vctForwardDeclarations.h:131
vctDynamicVectorRef()
Definition vctDynamicVectorRef.h:91
void SetRef(size_type size, pointer data, stride_type stride=1)
Definition vctDynamicVectorRef.h:156
void vctRandom(vctDynamicMatrixBase< _matrixOwnerType, _elementType > &matrix, const typename vctDynamicMatrixBase< _matrixOwnerType, _elementType >::value_type min, const typename vctDynamicMatrixBase< _matrixOwnerType, _elementType >::value_type max)
Definition vctRandomDynamicMatrix.h:47
Note
Make sure the underlying memory is not freed after the Ref object is created and before it is used. This would lead to faulty memory access and potential bugs.
vctDynamicVectorRef can perform const and non-const operations. It can be initialized with a non-const object only (value_type *). For a const Ref, see vctDynamicConstVectorRef.
See also
vctDynamicVector, vctDynamicConstVectorRef
Parameters
_elementTypeType of elements referenced. Also defined as value_type.

Member Typedef Documentation

◆ BaseType

template<class _elementType>
typedef vctDynamicVectorBase<vctDynamicVectorRefOwner<_elementType>, _elementType> vctDynamicVectorRef< _elementType >::BaseType

◆ const_iterator

template<class _elementType>
typedef VectorOwnerType::const_iterator vctDynamicVectorRef< _elementType >::const_iterator

◆ const_reverse_iterator

template<class _elementType>
typedef VectorOwnerType::const_reverse_iterator vctDynamicVectorRef< _elementType >::const_reverse_iterator

◆ CopyType

template<class _elementType>
typedef BaseType::CopyType vctDynamicVectorRef< _elementType >::CopyType

◆ iterator

template<class _elementType>
typedef VectorOwnerType::iterator vctDynamicVectorRef< _elementType >::iterator

◆ reverse_iterator

template<class _elementType>
typedef VectorOwnerType::reverse_iterator vctDynamicVectorRef< _elementType >::reverse_iterator

◆ ThisType

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

◆ VectorOwnerType

template<class _elementType>
typedef vctDynamicVectorRefOwner<_elementType> vctDynamicVectorRef< _elementType >::VectorOwnerType

Constructor & Destructor Documentation

◆ vctDynamicVectorRef() [1/7]

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

Default constructor initializes the vector reference to NULL

◆ vctDynamicVectorRef() [2/7]

template<class _elementType>
vctDynamicVectorRef< _elementType >::vctDynamicVectorRef ( const ThisType & other)
inline

Copy constructor. This copy constructor takes a const reference on the object to copy but has to remove the const-ness of the point to create a vctDynamicVectorRef and allow it to manipulate elements. The explict use of a const_cast is far from great but there is no easy solution as C++ requires the copy constructor to take a const reference.

◆ vctDynamicVectorRef() [3/7]

template<class _elementType>
vctDynamicVectorRef< _elementType >::vctDynamicVectorRef ( size_type size,
value_type * data,
stride_type stride = 1 )
inline

◆ vctDynamicVectorRef() [4/7]

template<class _elementType>
template<size_type __size, stride_type __stride, class __dataPtrType>
vctDynamicVectorRef< _elementType >::vctDynamicVectorRef ( vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > & otherVector,
size_type startPosition = 0 )
inline

Initialize a dynamic reference to a fixed-size vector.

Note
This constructor is non-explicit, and allows automatic conversion from a fixed-size vector to a dynamic vector representation.
The size and stride values are taken from the fixed size vector.

◆ vctDynamicVectorRef() [5/7]

template<class _elementType>
template<size_type __size, stride_type __stride, class __dataPtrType>
vctDynamicVectorRef< _elementType >::vctDynamicVectorRef ( vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > & otherVector,
size_type startPosition,
size_type length )
inline

Initialize a dynamic reference to specified subvector of a fixed-size vector.

Note
This constructor allows automatic conversion from a fixed-size vector to a dynamic vector representation.
The stride values are taken from the fixed size vector, but the starting point and length must be specified.

◆ vctDynamicVectorRef() [6/7]

template<class _elementType>
template<class __vectorOwnerType>
vctDynamicVectorRef< _elementType >::vctDynamicVectorRef ( vctDynamicVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

Initialize a dynamic reference to a dynamic vector.

Note
the starting point, size, and stride, are taken from the other vector.

◆ vctDynamicVectorRef() [7/7]

template<class _elementType>
template<class __vectorOwnerType>
vctDynamicVectorRef< _elementType >::vctDynamicVectorRef ( vctDynamicVectorBase< __vectorOwnerType, _elementType > & otherVector,
size_type startPosition,
size_type length )
inline

Initialize a dynamic reference to a dynamic vector.

Note
the stride is taken from the other vector, but the starting point and the length must be specified.

Member Function Documentation

◆ DeSerializeRaw()

template<class _elementType>
void vctDynamicVectorRef< _elementType >::DeSerializeRaw ( std::istream & inputStream)
inline

Binary deserialization. This method can not resize the existing block of memory and will throw an exception is the sizes don't match.

◆ operator=() [1/5]

template<class _elementType>
ThisType & vctDynamicVectorRef< _elementType >::operator= ( const ThisType & other)
inline

Assignment operation between vectors of different types

Parameters
otherThe vector to be copied.
Note
We overload operator = to perform elemenwise copy/assign. Although one may consider other meanings for the overloaded operator, we thought this was the most natural one.

◆ operator=() [2/5]

template<class _elementType>
ThisType & vctDynamicVectorRef< _elementType >::operator= ( const value_type & value)
inline

Assignement of a scalar to all elements. See also SetAll.

◆ operator=() [3/5]

template<class _elementType>
template<class __vectorOwnerType, typename __elementType>
ThisType & vctDynamicVectorRef< _elementType >::operator= ( const vctDynamicConstVectorBase< __vectorOwnerType, __elementType > & other)
inline

◆ operator=() [4/5]

template<class _elementType>
ThisType & vctDynamicVectorRef< _elementType >::operator= ( const vctDynamicConstVectorRef< value_type > & other)
inline

◆ operator=() [5/5]

template<class _elementType>
template<size_type __size, stride_type __stride, class __elementType, class __dataPtrType>
ThisType & vctDynamicVectorRef< _elementType >::operator= ( const vctFixedSizeConstVectorBase< __size, __stride, __elementType, __dataPtrType > & other)
inline

◆ SetRef() [1/5]

template<class _elementType>
void vctDynamicVectorRef< _elementType >::SetRef ( size_type size,
pointer data,
stride_type stride = 1 )
inline

◆ SetRef() [2/5]

template<class _elementType>
template<class __vectorOwnerType>
void vctDynamicVectorRef< _elementType >::SetRef ( vctDynamicVectorBase< __vectorOwnerType, _elementType > & otherVector)
inline

Set a dynamic reference to a dynamic vector.

Note
the size and memory stride of this reference will be equal to the size memory stride of the input vector.

◆ SetRef() [3/5]

template<class _elementType>
template<class __vectorOwnerType>
void vctDynamicVectorRef< _elementType >::SetRef ( vctDynamicVectorBase< __vectorOwnerType, _elementType > & otherVector,
size_type startPosition,
size_type length )
inline

Set a dynamic reference to a specified subvector of a dynamic vector.

Note
the memory stride of this reference will be equal to the memory stride of the input vector.
This method verifies that the size of this vector does not exceed the size of the input vector (otherwise cmnThrow is used to throw std::out_of_range).

◆ SetRef() [4/5]

template<class _elementType>
template<size_type __size, stride_type __stride, class __dataPtrType>
void vctDynamicVectorRef< _elementType >::SetRef ( vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > & otherVector,
size_type startPosition,
size_type length )
inline

Set a dynamic reference to a specified subvector of a fixed-size vector.

Note
the memory stride of this reference will be equal to the memory stride of the input vector.
This method verifies that the size of this vector does not exceed the size of the input vector (otherwise cmnThrow is used to throw std::out_of_range).

◆ SetRef() [5/5]

template<class _elementType>
template<size_type __size, stride_type __stride, class __dataPtrType>
void vctDynamicVectorRef< _elementType >::SetRef ( vctFixedSizeVectorBase< __size, __stride, _elementType, __dataPtrType > & otherVector,
size_type startPosition = 0 )
inline

Set a dynamic reference to a fixed-size vector.

Parameters
otherVectorthe vector for which a new reference is set.
startPositionthe index of the first element in otherVector to be indexed by this reference.
Note
The size of the reference is set to the size of otherVector minus the startPosition. By default, startPosition=0 and the behavior is transparent.
the size and memory stride of this reference will be equal to the size and memory stride of the input vector.

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

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

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