EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Classes
thomsonreuters::ema::access::EmaVector< T > Class Template Reference

EmaVector class provides template vector implementation.

Public Member Functions

Constructor
 EmaVector (UInt32 capacity=0)
 
Copy Constructor
 EmaVector (const EmaVector< T > &other)
 
Assignment Operator
EmaVector< T > & operator= (const EmaVector< T > &other)
 
Destructor
virtual ~EmaVector ()
 
Accessors
bool empty () const
 
UInt32 size () const
 
UInt32 capacity () const
 
const T & operator[] (UInt32 index) const
 
T & operator[] (UInt32 index)
 
Int64 getPositionOf (const T &value) const
 
bool operator== (const EmaVector< T > &other) const
 
Operations
void clear ()
 
void push_back (const T &entry)
 
bool removePosition (UInt32 pos)
 
bool removeValue (const T &value)
 

Detailed Description

template<class T>
class thomsonreuters::ema::access::EmaVector< T >

Definition at line 29 of file EmaVector.h.

Constructor & Destructor Documentation

template<class T >
thomsonreuters::ema::access::EmaVector< T >::EmaVector ( UInt32  capacity = 0)
default constructor
Remarks
sets initial vector capacity to zero

Definition at line 160 of file EmaVector.h.

template<class T>
thomsonreuters::ema::access::EmaVector< T >::EmaVector ( const EmaVector< T > &  other)

copy constructor

Definition at line 171 of file EmaVector.h.

template<class T >
thomsonreuters::ema::access::EmaVector< T >::~EmaVector ( )
virtual

destructor

Definition at line 234 of file EmaVector.h.

Member Function Documentation

template<class T >
UInt32 thomsonreuters::ema::access::EmaVector< T >::capacity ( ) const
method to obtain current capacity of the vector
Returns
the size of the storage space currently allocated for the vector, expressed in terms of elements

Definition at line 290 of file EmaVector.h.

template<class T >
void thomsonreuters::ema::access::EmaVector< T >::clear ( )

clear the vector

Definition at line 242 of file EmaVector.h.

template<class T >
bool thomsonreuters::ema::access::EmaVector< T >::empty ( ) const

method to check if the vector is empty

Definition at line 367 of file EmaVector.h.

template<class T>
Int64 thomsonreuters::ema::access::EmaVector< T >::getPositionOf ( const T &  value) const
returns position of the first encountered element on the vector

that matches passed in value

Parameters
value- value of the element to be found
Returns
-1 if no matching element was found and position otherwise

Definition at line 320 of file EmaVector.h.

template<class T>
EmaVector< T > & thomsonreuters::ema::access::EmaVector< T >::operator= ( const EmaVector< T > &  other)

assignment operator

Definition at line 189 of file EmaVector.h.

template<class T>
bool thomsonreuters::ema::access::EmaVector< T >::operator== ( const EmaVector< T > &  other) const

comparison operator for the entire list

Definition at line 221 of file EmaVector.h.

template<class T >
const T & thomsonreuters::ema::access::EmaVector< T >::operator[] ( UInt32  index) const
index operator
Remarks
allows read only access to the i-th element of the vector

Definition at line 308 of file EmaVector.h.

template<class T >
T & thomsonreuters::ema::access::EmaVector< T >::operator[] ( UInt32  index)
index operator
Remarks
allows read & write access to the i-th element of the vector

Definition at line 296 of file EmaVector.h.

template<class T>
void thomsonreuters::ema::access::EmaVector< T >::push_back ( const T &  entry)
method to push new entries on to the back of the vector
Remarks
will automatically resize if needed

Definition at line 248 of file EmaVector.h.

template<class T >
bool thomsonreuters::ema::access::EmaVector< T >::removePosition ( UInt32  pos)
Removes position specified element from the vector
Parameters
posposition of the element to be removed
Returns
true if this element was removed, false otherwise

Definition at line 337 of file EmaVector.h.

template<class T>
bool thomsonreuters::ema::access::EmaVector< T >::removeValue ( const T &  value)
Removes value specified element from the vector
Parameters
value- value of the element to be removed
Returns
true if this element was found and removed, false otherwise
Remarks
will remove the very first encountered element (e.g., with lowest position) matching passed in value

Definition at line 353 of file EmaVector.h.

template<class T >
UInt32 thomsonreuters::ema::access::EmaVector< T >::size ( ) const
method to obtain current size of the vector
Returns
number of elements on the vector

Definition at line 284 of file EmaVector.h.