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

#include <vctDynamicMatrix.h>

Inheritance diagram for vctReturnDynamicMatrix< _elementType >:
vctDynamicMatrix< _elementType >

Public Types

typedef vctDynamicMatrix< _elementType > BaseType

Public Member Functions

 VCT_CONTAINER_TRAITS_TYPEDEFS (_elementType)
 vctReturnDynamicMatrix (const BaseType &other)

Detailed Description

template<class _elementType>
class vctReturnDynamicMatrix< _elementType >

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

Use this class only when you want to return a newly created dynamic matrix 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 vctReturnDynamicMatrix.

Member Typedef Documentation

◆ BaseType

template<class _elementType>
typedef vctDynamicMatrix<_elementType> vctReturnDynamicMatrix< _elementType >::BaseType

Base type of vctReturnDynamicMatrix.

Constructor & Destructor Documentation

◆ vctReturnDynamicMatrix()

template<class _elementType>
vctReturnDynamicMatrix< _elementType >::vctReturnDynamicMatrix ( const BaseType & other)
inlineexplicit

Member Function Documentation

◆ VCT_CONTAINER_TRAITS_TYPEDEFS()

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

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