cisst-saw
Loading...
Searching...
No Matches
vctReturnDynamicNArray< _elementType, _dimension > Class Template Reference

#include <vctDynamicNArray.h>

Inheritance diagram for vctReturnDynamicNArray< _elementType, _dimension >:
vctDynamicNArray< _elementType, _dimension >

Public Types

typedef vctDynamicNArray< _elementType, _dimension > BaseType

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 VCT_NARRAY_TRAITS_TYPEDEFS (_dimension)
 vctReturnDynamicNArray (const BaseType &other)

Detailed Description

template<class _elementType, vct::size_type _dimension>
class vctReturnDynamicNArray< _elementType, _dimension >

Class vctReturnDynamicNArray is specialized to store a temporary nArray object by transferring ownership. An object of this class has all the methods inherited from vctDynamicNArray, but can only be constructed in one way – taking the ownership from another vctDynamicNArray (or vctReturnDynamicNArray) object. In turn, when an assignment occurs from a vctReturnDynamicNArray to a vctDynamicNArray (or likewise construction), the LHS vctDynamicNArray strips this object from the ownership of the data.

Use this class only when you want to return a newly created dynamic nArray from a function, without going through memory allocation and deallocation. Never use it on an object that is going to remain in scope after constructing the vctReturnDynamicNArray.

Member Typedef Documentation

◆ BaseType

template<class _elementType, vct::size_type _dimension>
typedef vctDynamicNArray<_elementType, _dimension> vctReturnDynamicNArray< _elementType, _dimension >::BaseType

Base type of vctReturnDynamicNArray.

Constructor & Destructor Documentation

◆ vctReturnDynamicNArray()

template<class _elementType, vct::size_type _dimension>
vctReturnDynamicNArray< _elementType, _dimension >::vctReturnDynamicNArray ( const BaseType & other)
inlineexplicit

Member Function Documentation

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

template<class _elementType, vct::size_type _dimension>
vctReturnDynamicNArray< _elementType, _dimension >::VCT_CONTAINER_TRAITS_TYPEDEFS ( _elementType )

◆ VCT_NARRAY_TRAITS_TYPEDEFS()

template<class _elementType, vct::size_type _dimension>
vctReturnDynamicNArray< _elementType, _dimension >::VCT_NARRAY_TRAITS_TYPEDEFS ( _dimension )

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