openfluid::core::Vector< T > Class Template Reference

List of all members.

Public Member Functions

 Vector ()
 Vector (const Vector &Vector)
 Vector (unsigned long Size)
 Vector (unsigned long Size, T InitValue)
 Vector (T *Data, unsigned long Size)
 ~Vector ()
unsigned long getSize () const
unsigned long size () const
T * getData () const
void setData (T *Data, unsigned long Size)
getElement (unsigned long Index) const
at (unsigned long Index) const
void setElement (unsigned long Index, T Element)
T & operator[] (unsigned long Index)
Vector< T > & operator= (const Vector &A)
void clear ()


Detailed Description

template<class T>
class openfluid::core::Vector< T >

Template class for vector data

Constructor & Destructor Documentation

template<class T >
openfluid::core::Vector< T >::Vector (  )  [inline]

Default constructor, creates an empty vector

template<class T >
openfluid::core::Vector< T >::Vector ( const Vector< T > &  Vector  )  [inline]

Copy constructor

template<class T >
openfluid::core::Vector< T >::Vector ( unsigned long  Size  )  [inline]

Constructor, creates a vector containing Size elements

template<class T >
openfluid::core::Vector< T >::Vector ( unsigned long  Size,
InitValue 
) [inline]

Constructor, creates a vector containing Size elements, initialized with value InitValue

template<class T >
openfluid::core::Vector< T >::Vector ( T *  Data,
unsigned long  Size 
) [inline]

Constructor, creates a vector of size Size, containing Data

template<class T >
openfluid::core::Vector< T >::~Vector (  )  [inline]

Destructor


Member Function Documentation

template<class T >
T openfluid::core::Vector< T >::at ( unsigned long  Index  )  const [inline]

Returns the element of the vector for index Index

template<class T >
void openfluid::core::Vector< T >::clear (  )  [inline]

Clears the vector (empty and size is 0)

template<class T >
T* openfluid::core::Vector< T >::getData (  )  const [inline]

Returns a pointer to the content of the vector (like C arrays)

template<class T >
T openfluid::core::Vector< T >::getElement ( unsigned long  Index  )  const [inline]

Returns the element of the vector for index Index

template<class T >
unsigned long openfluid::core::Vector< T >::getSize (  )  const [inline]

Returns the size of the vector

template<class T >
Vector< T > & openfluid::core::Vector< T >::operator= ( const Vector< T > &  A  )  [inline]

Allocation operator

template<class T >
T & openfluid::core::Vector< T >::operator[] ( unsigned long  Index  )  [inline]

Operator to set a new value for element given between []

template<class T >
void openfluid::core::Vector< T >::setData ( T *  Data,
unsigned long  Size 
) [inline]

Sets data for the vector from Data and with size Size

template<class T >
void openfluid::core::Vector< T >::setElement ( unsigned long  Index,
Element 
) [inline]

Sets a new value for element at the given index

template<class T >
unsigned long openfluid::core::Vector< T >::size (  )  const [inline]

Returns the size of the vector


Generated using Doxygen 1.5.8
Creative Commons License Creative Commons By-NC-ND license