vdr 2.8.1
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, int Count=1)
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 714 of file tools.h.

Constructor & Destructor Documentation

◆ cVector() [1/2]

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

Definition at line 720 of file tools.h.

References cVector().

Referenced by cVector(), and operator=().

◆ cVector() [2/2]

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

Definition at line 736 of file tools.h.

References allocated, data, Realloc(), and size.

◆ ~cVector()

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

Definition at line 743 of file tools.h.

References data.

Member Function Documentation

◆ Append()

◆ AppendUnique()

template<class T>
bool cVector< T >::AppendUnique ( T Data)
inline

Definition at line 793 of file tools.h.

References Append(), and IndexOf().

◆ At()

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

◆ Clear()

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

Reimplemented in cStringList.

Definition at line 821 of file tools.h.

References data, and size.

Referenced by cCamSlot::BuildCaPmts(), and cStringList::Clear().

◆ IndexOf()

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

Definition at line 759 of file tools.h.

References data, and size.

Referenced by AppendUnique(), InsertUnique(), and RemoveElement().

◆ Insert()

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

Definition at line 768 of file tools.h.

References Append(), data, Realloc(), and size.

Referenced by InsertUnique().

◆ InsertUnique()

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

Definition at line 779 of file tools.h.

References IndexOf(), and Insert().

◆ operator=()

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

Definition at line 721 of file tools.h.

References cVector().

◆ operator[]() [1/2]

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

Definition at line 755 of file tools.h.

References At().

◆ operator[]() [2/2]

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

Definition at line 751 of file tools.h.

References At().

◆ Realloc()

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

Definition at line 722 of file tools.h.

References allocated, data, and esyslog.

Referenced by Append(), At(), cVector(), and Insert().

◆ Remove()

template<class T>
virtual void cVector< T >::Remove ( int Index,
int Count = 1 )
inlinevirtual

Definition at line 801 of file tools.h.

References data, and size.

Referenced by RemoveElement().

◆ RemoveElement()

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

Definition at line 812 of file tools.h.

References IndexOf(), and Remove().

◆ Size()

◆ Sort()

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

Definition at line 827 of file tools.h.

References data, and size.

Referenced by cMenuSetupCAMItem::Changed(), cStringList::Sort(), and cStringList::SortNumerically().

Member Data Documentation

◆ allocated

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 717 of file tools.h.

Referenced by Append(), cVector(), and Realloc().

◆ data

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

Definition at line 719 of file tools.h.

Referenced by Append(), At(), Clear(), cVector(), IndexOf(), Insert(), Realloc(), Remove(), Sort(), and ~cVector().

◆ size

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

Definition at line 718 of file tools.h.

Referenced by Append(), At(), Clear(), cVector(), IndexOf(), Insert(), Remove(), Size(), and Sort().


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