vdr 2.7.5
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 701 of file tools.h.

Constructor & Destructor Documentation

◆ cVector() [1/2]

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

Definition at line 707 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 723 of file tools.h.

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

◆ ~cVector()

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

Definition at line 730 of file tools.h.

References data.

Member Function Documentation

◆ Append()

◆ AppendUnique()

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

Definition at line 780 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 805 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 746 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 755 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 766 of file tools.h.

References IndexOf(), and Insert().

◆ operator=()

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

Definition at line 708 of file tools.h.

References cVector().

◆ operator[]() [1/2]

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

Definition at line 742 of file tools.h.

References At().

◆ operator[]() [2/2]

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

Definition at line 738 of file tools.h.

References At().

◆ Realloc()

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

Definition at line 709 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)
inlinevirtual

Definition at line 788 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 796 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 811 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 704 of file tools.h.

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

◆ data

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

Definition at line 706 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 705 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: