$search

P::Array< Elem > Class Template Reference

#include <Array.hh>

List of all members.

Public Member Functions

 Array (const Array &a)
 Array (unsigned s=0) throw (Except)
unsigned CircularNext (unsigned i)
unsigned CircularPrev (unsigned i)
void Clear ()
bool Contains (const Elem &el) const
bool ContainsBackwards (const Elem &el) const
void * Data ()
void DeepCopy (const Array &a)
bool Empty ()
void Erase (unsigned i)
void EraseFirst ()
void EraseLast ()
unsigned Find (unsigned start, const Elem &el)
unsigned Find (const Elem &el)
unsigned FindBackwards (const Elem &el)
const Elem & First () const throw (Except)
Elem & First () throw (Except)
void InsertAfter (unsigned i, const Elem &el)
void InsertBefore (unsigned i, const Elem &el)
void InsertSorted (const Elem &el, int(*compar)(const void *, const void *))
bool Intersect (const Array &a)
const Elem & Last () const throw (Except)
Elem & Last () throw (Except)
Arrayoperator= (const Array &a)
const Elem & operator[] (unsigned i) const
Elem & operator[] (unsigned i)
void PushBack (const Elem &el)
void PushFront (const Elem &el)
void Resize (unsigned new_size)
void Reverse ()
void Set (const Elem &el)
unsigned Size () const
void Sort (int(*compar)(const void *, const void *))
void Swap (unsigned i, unsigned j)
 ~Array ()

Private Member Functions

void CheckIndex (unsigned i) const throw (Except)
void EnsureCapacity (unsigned need_size) throw (Except)

Private Attributes

Elem * array
 actual array
unsigned capacity
 allocated size of array
unsigned size
 used size of array

Static Private Attributes

static const unsigned DEFAULT_SIZE = 10

Detailed Description

template<class Elem>
class P::Array< Elem >

My own array class. STL vectors are just too complicated to debug and sorting is a nightmare, Note: Although I loathe templates, I am using them here, hoping that they won't make too many troubles later on...

Definition at line 21 of file Array.hh.


Constructor & Destructor Documentation

template<class Elem>
P::Array< Elem >::Array ( unsigned  s = 0  )  throw (Except)
template<class Elem>
P::Array< Elem >::Array ( const Array< Elem > &  a  ) 
template<class Elem>
P::Array< Elem >::~Array (  ) 

Member Function Documentation

template<class Elem>
void P::Array< Elem >::CheckIndex ( unsigned  i  )  const throw (Except) [private]
template<class Elem>
unsigned P::Array< Elem >::CircularNext ( unsigned  i  ) 
template<class Elem>
unsigned P::Array< Elem >::CircularPrev ( unsigned  i  ) 
template<class Elem>
void P::Array< Elem >::Clear (  )  [inline]

Definition at line 60 of file Array.hh.

template<class Elem>
bool P::Array< Elem >::Contains ( const Elem &  el  )  const
template<class Elem>
bool P::Array< Elem >::ContainsBackwards ( const Elem &  el  )  const
template<class Elem>
void* P::Array< Elem >::Data (  ) 
template<class Elem>
void P::Array< Elem >::DeepCopy ( const Array< Elem > &  a  ) 
template<class Elem>
bool P::Array< Elem >::Empty (  )  [inline]

Definition at line 40 of file Array.hh.

template<class Elem>
void P::Array< Elem >::EnsureCapacity ( unsigned  need_size  )  throw (Except) [private]
template<class Elem>
void P::Array< Elem >::Erase ( unsigned  i  ) 
template<class Elem>
void P::Array< Elem >::EraseFirst (  ) 
template<class Elem>
void P::Array< Elem >::EraseLast (  ) 
template<class Elem>
unsigned P::Array< Elem >::Find ( unsigned  start,
const Elem &  el 
)
template<class Elem>
unsigned P::Array< Elem >::Find ( const Elem &  el  ) 
template<class Elem>
unsigned P::Array< Elem >::FindBackwards ( const Elem &  el  ) 
template<class Elem>
const Elem& P::Array< Elem >::First (  )  const throw (Except)
template<class Elem>
Elem& P::Array< Elem >::First (  )  throw (Except)
template<class Elem>
void P::Array< Elem >::InsertAfter ( unsigned  i,
const Elem &  el 
)
template<class Elem>
void P::Array< Elem >::InsertBefore ( unsigned  i,
const Elem &  el 
)
template<class Elem>
void P::Array< Elem >::InsertSorted ( const Elem &  el,
int(*)(const void *, const void *)  compar 
)
template<class Elem>
bool P::Array< Elem >::Intersect ( const Array< Elem > &  a  ) 
template<class Elem>
const Elem& P::Array< Elem >::Last (  )  const throw (Except)
template<class Elem>
Elem& P::Array< Elem >::Last (  )  throw (Except)
template<class Elem>
Array& P::Array< Elem >::operator= ( const Array< Elem > &  a  )  [inline]

Definition at line 37 of file Array.hh.

template<class Elem>
const Elem& P::Array< Elem >::operator[] ( unsigned  i  )  const
template<class Elem>
Elem& P::Array< Elem >::operator[] ( unsigned  i  ) 
template<class Elem>
void P::Array< Elem >::PushBack ( const Elem &  el  ) 
template<class Elem>
void P::Array< Elem >::PushFront ( const Elem &  el  ) 
template<class Elem>
void P::Array< Elem >::Resize ( unsigned  new_size  ) 
template<class Elem>
void P::Array< Elem >::Reverse (  ) 
template<class Elem>
void P::Array< Elem >::Set ( const Elem &  el  ) 
template<class Elem>
unsigned P::Array< Elem >::Size (  )  const [inline]

Definition at line 50 of file Array.hh.

template<class Elem>
void P::Array< Elem >::Sort ( int(*)(const void *, const void *)  compar  ) 
template<class Elem>
void P::Array< Elem >::Swap ( unsigned  i,
unsigned  j 
)

Member Data Documentation

template<class Elem>
Elem* P::Array< Elem >::array [private]

actual array

Definition at line 26 of file Array.hh.

template<class Elem>
unsigned P::Array< Elem >::capacity [private]

allocated size of array

Definition at line 28 of file Array.hh.

template<class Elem>
const unsigned P::Array< Elem >::DEFAULT_SIZE = 10 [static, private]

Definition at line 24 of file Array.hh.

template<class Elem>
unsigned P::Array< Elem >::size [private]

used size of array

Definition at line 27 of file Array.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Fri Mar 1 16:57:58 2013