artefaktur
software engineer &        architecture

 
 
 
 

class core_vector

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::sys::core_vector< T > Class Template Reference

#include <core_vector.h>

List of all members.


Detailed Description

template<class T>
class acdk::lang::sys::core_vector< T >

replacement for the std::vector class.

access outside valid range will throw acdk::lang::RIndexOutOfBoundsException


Public Types

typedef T value_type
typedef T * iterator
typedef const T * const_iterator
typedef core_vector_reverse_iterator<
T > 
reverse_iterator
typedef core_vector_iterator<
T > 
const_reverse_iterator

Public Member Functions

 core_vector ()
 core_vector (int initsize, const T &fillwith=T())
 core_vector (int initsize, int initcap, const T &fillwith)
 core_vector (const core_vector< T > &other)
 copy constructor

 ~core_vector ()
core_vector< T > & operator= (const core_vector< T > &other)
bool operator== (const core_vector< T > &other) const
bool operator!= (const core_vector< T > &other) const
void assign (const_iterator b, const_iterator e)
void insert (iterator it, const_iterator first, const_iterator last)
void insert (int idx, const T &elem)
void ensureSize (int newsize, const T &fillwith=T())
 ensure that the size of the vector is at least given newize.

void resize (int newsize, const T &fillwith=T())
 resize the array on given newsize if newsize > as size() new slots will be filled with fillwith

void ensureCapacity (int newcap)
void reserve (int newcap)
 STL compatibility.

void _ensureCapacity (int newcap)
T & operator[] (int idx)
const T & operator[] (int idx) const
T & at (int idx)
const T & at (int idx) const
void add (const T &el)
void push_back (const T &el)
void addLast (const T &el)
void addFirst (const T &el)
int size () const
int capacity () const
bool empty () const
T & front ()
const T & front () const
T & back ()
const T & back () const
void pop_back ()
void pop_front ()
bool hasElement (const T &el) const
void clear ()
iterator erase (iterator it)
iterator erase (iterator it, iterator eit)
bool deleteElement (const T &el)
const_iterator find (const T &t) const
iterator find (const T &t)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
reverse_iterator rend ()
T * data ()
void swap (iterator first, iterator second)
void check_range (int idx) const

Protected Member Functions

void _destroy ()
void _destroy (iterator s, iterator e)
T * _allocData (int elemcount)
void _freeData ()
void _copy2end (const_iterator oit, const_iterator eit)

Private Attributes

T * _begin
T * _end
int _capacity

Friends

class core_vector_iterator< T >
class core_vector_reverse_iterator< T >

Member Typedef Documentation

template<class T>
typedef const T* acdk::lang::sys::core_vector< T >::const_iterator
 

template<class T>
typedef core_vector_iterator<T> acdk::lang::sys::core_vector< T >::const_reverse_iterator
 

template<class T>
typedef T* acdk::lang::sys::core_vector< T >::iterator
 

template<class T>
typedef core_vector_reverse_iterator<T> acdk::lang::sys::core_vector< T >::reverse_iterator
 

template<class T>
typedef T acdk::lang::sys::core_vector< T >::value_type
 


Constructor & Destructor Documentation

template<class T>
acdk::lang::sys::core_vector< T >::core_vector  )  [inline]
 

template<class T>
acdk::lang::sys::core_vector< T >::core_vector int  initsize,
const T &  fillwith = T()
[inline, explicit]
 

template<class T>
acdk::lang::sys::core_vector< T >::core_vector int  initsize,
int  initcap,
const T &  fillwith
[inline]
 

template<class T>
acdk::lang::sys::core_vector< T >::core_vector const core_vector< T > &  other  )  [inline]
 

copy constructor

template<class T>
acdk::lang::sys::core_vector< T >::~core_vector  )  [inline]
 


Member Function Documentation

template<class T>
T* acdk::lang::sys::core_vector< T >::_allocData int  elemcount  )  [inline, protected]
 

template<class T>
void acdk::lang::sys::core_vector< T >::_copy2end const_iterator  oit,
const_iterator  eit
[inline, protected]
 

template<class T>
void acdk::lang::sys::core_vector< T >::_destroy iterator  s,
iterator  e
[inline, protected]
 

template<class T>
void acdk::lang::sys::core_vector< T >::_destroy  )  [inline, protected]
 

template<class T>
void acdk::lang::sys::core_vector< T >::_ensureCapacity int  newcap  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::_freeData  )  [inline, protected]
 

template<class T>
void acdk::lang::sys::core_vector< T >::add const T &  el  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::addFirst const T &  el  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::addLast const T &  el  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::assign const_iterator  b,
const_iterator  e
[inline]
 

template<class T>
const T& acdk::lang::sys::core_vector< T >::at int  idx  )  const [inline]
 

template<class T>
T& acdk::lang::sys::core_vector< T >::at int  idx  )  [inline]
 

template<class T>
const T& acdk::lang::sys::core_vector< T >::back  )  const [inline]
 

template<class T>
T& acdk::lang::sys::core_vector< T >::back  )  [inline]
 

template<class T>
const_iterator acdk::lang::sys::core_vector< T >::begin  )  const [inline]
 

template<class T>
iterator acdk::lang::sys::core_vector< T >::begin  )  [inline]
 

template<class T>
int acdk::lang::sys::core_vector< T >::capacity  )  const [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::check_range int  idx  )  const [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::clear  )  [inline]
 

template<class T>
T* acdk::lang::sys::core_vector< T >::data  )  [inline]
 

template<class T>
bool acdk::lang::sys::core_vector< T >::deleteElement const T &  el  )  [inline]
 

template<class T>
bool acdk::lang::sys::core_vector< T >::empty  )  const [inline]
 

template<class T>
const_iterator acdk::lang::sys::core_vector< T >::end  )  const [inline]
 

template<class T>
iterator acdk::lang::sys::core_vector< T >::end  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::ensureCapacity int  newcap  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::ensureSize int  newsize,
const T &  fillwith = T()
[inline]
 

ensure that the size of the vector is at least given newize.

Fills new empty elements with fillwi th

template<class T>
iterator acdk::lang::sys::core_vector< T >::erase iterator  it,
iterator  eit
[inline]
 

template<class T>
iterator acdk::lang::sys::core_vector< T >::erase iterator  it  )  [inline]
 

template<class T>
iterator acdk::lang::sys::core_vector< T >::find const T &  t  )  [inline]
 

template<class T>
const_iterator acdk::lang::sys::core_vector< T >::find const T &  t  )  const [inline]
 

template<class T>
const T& acdk::lang::sys::core_vector< T >::front  )  const [inline]
 

template<class T>
T& acdk::lang::sys::core_vector< T >::front  )  [inline]
 

template<class T>
bool acdk::lang::sys::core_vector< T >::hasElement const T &  el  )  const [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::insert int  idx,
const T &  elem
[inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::insert iterator  it,
const_iterator  first,
const_iterator  last
[inline]
 

template<class T>
bool acdk::lang::sys::core_vector< T >::operator!= const core_vector< T > &  other  )  const [inline]
 

template<class T>
core_vector<T>& acdk::lang::sys::core_vector< T >::operator= const core_vector< T > &  other  )  [inline]
 

template<class T>
bool acdk::lang::sys::core_vector< T >::operator== const core_vector< T > &  other  )  const [inline]
 

template<class T>
const T& acdk::lang::sys::core_vector< T >::operator[] int  idx  )  const [inline]
 

template<class T>
T& acdk::lang::sys::core_vector< T >::operator[] int  idx  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::pop_back  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::pop_front  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::push_back const T &  el  )  [inline]
 

template<class T>
reverse_iterator acdk::lang::sys::core_vector< T >::rbegin  )  [inline]
 

template<class T>
reverse_iterator acdk::lang::sys::core_vector< T >::rend  )  [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::reserve int  newcap  )  [inline]
 

STL compatibility.

template<class T>
void acdk::lang::sys::core_vector< T >::resize int  newsize,
const T &  fillwith = T()
[inline]
 

resize the array on given newsize if newsize > as size() new slots will be filled with fillwith

template<class T>
int acdk::lang::sys::core_vector< T >::size  )  const [inline]
 

template<class T>
void acdk::lang::sys::core_vector< T >::swap iterator  first,
iterator  second
[inline]
 


Friends And Related Function Documentation

template<class T>
friend class core_vector_iterator< T > [friend]
 

template<class T>
friend class core_vector_reverse_iterator< T > [friend]
 


Member Data Documentation

template<class T>
T* acdk::lang::sys::core_vector< T >::_begin [private]
 

template<class T>
int acdk::lang::sys::core_vector< T >::_capacity [private]
 

template<class T>
T* acdk::lang::sys::core_vector< T >::_end [private]
 

 
Last modified 2005-05-08 18:32 by SYSTEM By Artefaktur, Ing. Bureau Kommer