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

List of all members.

Public Member Functions

 Vector ()
 Vector (const Vector &Vector)
 Vector (long Size)
 Vector (long Size, T InitValue)
 Vector (T *Data, long Size)
 ~Vector ()
long getSize () const
long size () const
T * getData () const
void setData (T *Data, long Size)
getElement (long Index) const
at (long Index) const
void setElement (long Index, T Element)
T & operator[] (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 ( long  Size  )  [inline]

Constructor, creates a vector containing Size elements

template<class T>
openfluid::core::Vector< T >::Vector ( 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,
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>
long openfluid::core::Vector< T >::getSize (  )  const [inline]

Returns the size of the vector

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

Returns the size of the vector

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>
void openfluid::core::Vector< T >::setData ( T *  Data,
long  Size 
) [inline]

Sets data for the vector from Data and with size Size

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

Returns the element of the vector for index Index

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

Returns the element of the vector for index Index

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

Sets a new value for element at the given index

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

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

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

Allocation operator

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

Clears the vector (empty and size is 0)


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