vdr  2.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cVector< T > Class Template Reference

#include <tools.h>

Public Member Functions

 cVector (int Allocated=10)
 
virtual ~cVector ()
 
T & At (int Index) const
 
const T & operator[] (int Index) const
 
T & operator[] (int Index)
 
int IndexOf (const T &Data)
 
int Size (void) const
 
virtual void Insert (T Data, int Before=0)
 
bool InsertUnique (T Data, int Before=0)
 
virtual void Append (T Data)
 
bool AppendUnique (T Data)
 
virtual void Remove (int Index)
 
bool RemoveElement (const T &Data)
 
virtual void Clear (void)
 
void Sort (__compar_fn_t Compare)
 

Private Member Functions

 cVector (const cVector &Vector)
 
cVectoroperator= (const cVector &Vector)
 
void Realloc (int Index) const
 

Private Attributes

int allocated
 
int size
 
T * data
 

Detailed Description

template<class T>
class cVector< T >

Definition at line 498 of file tools.h.

Constructor & Destructor Documentation

template<class T>
cVector< T >::cVector ( const cVector< T > &  Vector)
inlineprivate

Definition at line 504 of file tools.h.

template<class T>
cVector< T >::cVector ( int  Allocated = 10)
inline

Definition at line 520 of file tools.h.

template<class T>
virtual cVector< T >::~cVector ( )
inlinevirtual

Definition at line 527 of file tools.h.

Member Function Documentation

template<class T>
virtual void cVector< T >::Append ( Data)
inlinevirtual
template<class T>
bool cVector< T >::AppendUnique ( Data)
inline

Definition at line 577 of file tools.h.

template<class T>
T& cVector< T >::At ( int  Index) const
inline

Definition at line 528 of file tools.h.

Referenced by cArgs::ReadDirectory().

template<class T>
virtual void cVector< T >::Clear ( void  )
inlinevirtual

Reimplemented in cStringList.

Definition at line 602 of file tools.h.

Referenced by cStringList::Clear(), and cCaPidReceiver::DelEmmPids().

template<class T>
int cVector< T >::IndexOf ( const T &  Data)
inline

Definition at line 543 of file tools.h.

template<class T>
virtual void cVector< T >::Insert ( Data,
int  Before = 0 
)
inlinevirtual

Definition at line 552 of file tools.h.

template<class T>
bool cVector< T >::InsertUnique ( Data,
int  Before = 0 
)
inline

Definition at line 563 of file tools.h.

template<class T>
cVector& cVector< T >::operator= ( const cVector< T > &  Vector)
inlineprivate

Definition at line 505 of file tools.h.

template<class T>
const T& cVector< T >::operator[] ( int  Index) const
inline

Definition at line 535 of file tools.h.

template<class T>
T& cVector< T >::operator[] ( int  Index)
inline

Definition at line 539 of file tools.h.

template<class T>
void cVector< T >::Realloc ( int  Index) const
inlineprivate

Definition at line 506 of file tools.h.

template<class T>
virtual void cVector< T >::Remove ( int  Index)
inlinevirtual

Definition at line 585 of file tools.h.

template<class T>
bool cVector< T >::RemoveElement ( const T &  Data)
inline

Definition at line 593 of file tools.h.

template<class T>
int cVector< T >::Size ( void  ) const
inline
template<class T>
void cVector< T >::Sort ( __compar_fn_t  Compare)
inline

Definition at line 608 of file tools.h.

Referenced by cStringList::Sort().

Member Data Documentation

template<class T>
int cVector< T >::allocated
mutableprivate

< cVector may only be used for simple types, like int or pointers - not for class objects that allocate additional memory!

Definition at line 501 of file tools.h.

template<class T>
T* cVector< T >::data
mutableprivate

Definition at line 503 of file tools.h.

template<class T>
int cVector< T >::size
mutableprivate

Definition at line 502 of file tools.h.


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