LoAdSG
SimpleVector< T > Class Template Reference

A simple vector implementation so as not to rely on the standard library implementation. This implementation has some of the same methods as the standard library. More...

#include <simpleMultiHash.h>

Inheritance diagram for SimpleVector< T >:

Public Member Functions

 ~SimpleVector ()
 Destroy the Simple Vector object.
 
 SimpleVector (const SimpleVector &other)
 copy constructor.
 
 SimpleVector (SimpleVector &&other) noexcept
 move constructor
 
SimpleVectoroperator= (const SimpleVector &other)
 copy assignment
 
SimpleVectoroperator= (SimpleVector &&other) noexcept
 move assignment
 
T & at (size_t i)
 Array access with error checking.
 

Private Attributes

size_t _capacity
 reserved capacity for this vector. Always bigger or euqal to size
 
size_t _size
 current number of elements in the Vector
 

Detailed Description

template<typename T>
class SimpleVector< T >

A simple vector implementation so as not to rely on the standard library implementation. This implementation has some of the same methods as the standard library.

Template Parameters
T

Constructor & Destructor Documentation

◆ SimpleVector() [1/2]

template<typename T >
SimpleVector< T >::SimpleVector ( const SimpleVector< T > &  other)
inline

copy constructor.

Parameters
other

◆ SimpleVector() [2/2]

template<typename T >
SimpleVector< T >::SimpleVector ( SimpleVector< T > &&  other)
inlinenoexcept

move constructor

Parameters
other

Member Function Documentation

◆ at()

template<typename T >
T & SimpleVector< T >::at ( size_t  i)
inline

Array access with error checking.

Exceptions
out_of_range
Parameters
i
Returns
T&

◆ operator=() [1/2]

template<typename T >
SimpleVector & SimpleVector< T >::operator= ( const SimpleVector< T > &  other)
inline

copy assignment

Parameters
other
Returns
SimpleVector&

◆ operator=() [2/2]

template<typename T >
SimpleVector & SimpleVector< T >::operator= ( SimpleVector< T > &&  other)
inlinenoexcept

move assignment

Parameters
other
Returns
SimpleVector&

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