COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
covise::coList< T > Class Template Reference

#include <coList.h>

Collaboration diagram for covise::coList< T >:
Collaboration graph
[legend]

Public Member Functions

 coList (void)
 default constructor, list is empty More...
 
 coList (int amount)
 create new list with 'amount' elements More...
 
 coList (const coList< T > &v)
 coList copy constructor More...
 
 ~coList (void)
 coList destructor More...
 
T & operator[] (int index)
 direct list access More...
 
const T & operator[] (int index) const
 direct list access More...
 
coList< T > & operator= (const coList< T > &v)
 assign from another coList More...
 
void init (const T &in_data)
 set all elements of the current list to in_data More...
 
void clear (void)
 clear the list (frees all data) More...
 
void set (int index, const T &in_data)
 set list element More...
 
void append (const T &in_data)
 append element More...
 
void append (const T *in_data)
 append element More...
 
void insert (int index, const T &in_data)
 insert element at the given list index More...
 
void replace (int index, const T &in_data)
 replace element at the given index More...
 
void remove (int index)
 remove element at position index More...
 
T & removeLast ()
 remove last element More...
 
bool removeElement (const T &in_data)
 finds first occurence of element 'in_data' and delete it More...
 
void newSize (int nelistw_size)
 resize the list More...
 
void fillWith (const T &in_data)
 fills the whole with in_data More...
 
T * getLast ()
 fills the whole with in_data More...
 
T * first ()
 get first element and set current index to 0 More...
 
T * last ()
 get last element and set current index to dim-1 More...
 
T * next ()
 get next element More...
 
T * prev ()
 get next element More...
 
int find (const T &in_data) const
 find the first occurrence of the specified element More...
 
int entries (void) const
 returns the number of list enries More...
 
int getSize (void) const
 returns the number of list enries More...
 
void print (char *name) const
 print out the contents of the list More...
 

Private Member Functions

void incSize (void)
 increase allocated Size More...
 

Private Attributes

T * data
 
int dim
 
int allocsize
 
int allocinc
 
int currentIndex
 
nullValue
 

Constructor & Destructor Documentation

template<class T >
INLINE covise::coList< T >::coList ( void  )

default constructor, list is empty

template<class T >
INLINE covise::coList< T >::coList ( int  amount)

create new list with 'amount' elements

template<class T >
INLINE covise::coList< T >::coList ( const coList< T > &  v)

coList copy constructor

template<class T >
INLINE covise::coList< T >::~coList ( void  )

coList destructor

Member Function Documentation

template<class T >
INLINE void covise::coList< T >::append ( const T &  in_data)

append element

template<class T>
void covise::coList< T >::append ( const T *  in_data)
inline

append element

template<class T >
INLINE void covise::coList< T >::clear ( void  )

clear the list (frees all data)

template<class T>
int covise::coList< T >::entries ( void  ) const
inline

returns the number of list enries

template<class T >
INLINE void covise::coList< T >::fillWith ( const T &  in_data)

fills the whole with in_data

template<class T >
INLINE int covise::coList< T >::find ( const T &  in_data) const

find the first occurrence of the specified element

template<class T>
T* covise::coList< T >::first ( )
inline

get first element and set current index to 0

template<class T>
T* covise::coList< T >::getLast ( )
inline

fills the whole with in_data

template<class T>
int covise::coList< T >::getSize ( void  ) const
inline

returns the number of list enries

template<class T >
INLINE void covise::coList< T >::incSize ( void  )
private

increase allocated Size

template<class T >
INLINE void covise::coList< T >::init ( const T &  in_data)

set all elements of the current list to in_data

template<class T >
INLINE void covise::coList< T >::insert ( int  index,
const T &  in_data 
)

insert element at the given list index

template<class T>
T* covise::coList< T >::last ( )
inline

get last element and set current index to dim-1

template<class T >
INLINE void covise::coList< T >::newSize ( int  nelistw_size)

resize the list

template<class T>
T* covise::coList< T >::next ( void  )
inline

get next element

template<class T >
INLINE coList< T > & covise::coList< T >::operator= ( const coList< T > &  v)

assign from another coList

template<class T>
T& covise::coList< T >::operator[] ( int  index)
inline

direct list access

template<class T>
const T& covise::coList< T >::operator[] ( int  index) const
inline

direct list access

template<class T>
T* covise::coList< T >::prev ( void  )
inline

get next element

template<class T >
INLINE void covise::coList< T >::print ( char *  name) const

print out the contents of the list

template<class T >
INLINE void covise::coList< T >::remove ( int  index)

remove element at position index

template<class T >
INLINE bool covise::coList< T >::removeElement ( const T &  in_data)

finds first occurence of element 'in_data' and delete it

template<class T>
T& covise::coList< T >::removeLast ( )
inline

remove last element

template<class T >
INLINE void covise::coList< T >::replace ( int  index,
const T &  in_data 
)

replace element at the given index

template<class T >
INLINE void covise::coList< T >::set ( int  index,
const T &  in_data 
)

set list element

Member Data Documentation

template<class T>
int covise::coList< T >::allocinc
private
template<class T>
int covise::coList< T >::allocsize
private
template<class T>
int covise::coList< T >::currentIndex
private
template<class T>
T* covise::coList< T >::data
private
template<class T>
int covise::coList< T >::dim
private
template<class T>
T covise::coList< T >::nullValue
private

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