DART  6.10.1
dart::common::CloneableVector< T > Class Template Reference

The CloneableVector type wraps a std::vector of an Cloneable type allowing it to be handled by an CloneableMapHolder. More...

#include <Cloneable.hpp>

Public Member Functions

 CloneableVector ()=default
 Default constructor. More...
 
 CloneableVector (const std::vector< T > &regularVector)
 Construct from a regular vector. More...
 
 CloneableVector (std::vector< T > &&regularVector)
 Construct from a regular vector using move semantics. More...
 
 CloneableVector (const CloneableVector &other)
 Construct this vector empty and then perform copy(other) More...
 
CloneableVectoroperator= (const CloneableVector &other)
 Call copy(other) on this vector. More...
 
std::unique_ptr< CloneableVector< T > > clone () const
 Create a copy of this CloneableVector's contents. More...
 
void copy (const CloneableVector< T > &anotherVector)
 Copy the contents of another cloneable vector into this one. More...
 
std::vector< T > & getVector ()
 Get a reference to the std::vector that this class is wrapping. More...
 
const std::vector< T > & getVector () const
 Get a reference to the std::vector that this class is wrapping. More...
 

Private Attributes

std::vector< T > mVector
 The std::vector that this class is wrapping. More...
 

Detailed Description

template<typename T>
class dart::common::CloneableVector< T >

The CloneableVector type wraps a std::vector of an Cloneable type allowing it to be handled by an CloneableMapHolder.

Constructor & Destructor Documentation

◆ CloneableVector() [1/4]

template<typename T >
dart::common::CloneableVector< T >::CloneableVector ( )
default

Default constructor.

◆ CloneableVector() [2/4]

template<typename T >
dart::common::CloneableVector< T >::CloneableVector ( const std::vector< T > &  regularVector)

Construct from a regular vector.

◆ CloneableVector() [3/4]

template<typename T >
dart::common::CloneableVector< T >::CloneableVector ( std::vector< T > &&  regularVector)

Construct from a regular vector using move semantics.

◆ CloneableVector() [4/4]

template<typename T >
dart::common::CloneableVector< T >::CloneableVector ( const CloneableVector< T > &  other)

Construct this vector empty and then perform copy(other)

Member Function Documentation

◆ clone()

template<typename T >
std::unique_ptr< CloneableVector< T > > dart::common::CloneableVector< T >::clone

Create a copy of this CloneableVector's contents.

◆ copy()

template<typename T >
void dart::common::CloneableVector< T >::copy ( const CloneableVector< T > &  anotherVector)

Copy the contents of another cloneable vector into this one.

◆ getVector() [1/2]

template<typename T >
std::vector< T > & dart::common::CloneableVector< T >::getVector

Get a reference to the std::vector that this class is wrapping.

◆ getVector() [2/2]

template<typename T >
const std::vector< T > & dart::common::CloneableVector< T >::getVector

Get a reference to the std::vector that this class is wrapping.

◆ operator=()

template<typename T >
CloneableVector< T > & dart::common::CloneableVector< T >::operator= ( const CloneableVector< T > &  other)

Call copy(other) on this vector.

Member Data Documentation

◆ mVector

template<typename T >
std::vector<T> dart::common::CloneableVector< T >::mVector
private

The std::vector that this class is wrapping.