In file include/csutil/csvector.h:

## class csVector : public csBase

> csVector is an abstract class which can hold an unlimited array of unspecified (void *) data

## Inheritance:

### Public Methods

csVector(int ilimit = 8, int ithreshold = 16)
  Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded
bool Delete(int n)
  Delete element number 'n' from vector
void DeleteAll()
  Delete all elements
virtual bool Equal(csSome Item, csConstSome Key)
  Compare a element with given key for equality
int Find(csSome which)
  Find a element in array and return its index (or -1 if not found)
int FindKey(csConstSome value)
  Find a element by key (using Equal method)
virtual bool FreeItem(csSome Item)
  Virtual function which frees a vector element; returns success status
inline csSome& Get(int n)
  Same but doesn't call SetLength () in the event n is out of bounds
bool Insert(int n, csSome Item)
  Insert element 'Item' before element 'n'
inline int Length()
  Query vector length
inline csSome& operator [] (int n)
  Get a reference to n-th element
inline csSome Pop()
  Pop a element from vector 'top'
inline void Push(csSome what)
  Push a element on 'top' of vector
void SetLength(int n)
  Set vector length to n
virtual ~csVector()
  Destroy the vector object

### Inherited from csBase:

## Documentation

> csVector is an abstract class which can hold an unlimited array of unspecified (void *) data. Since this is a basic object, it does not presume anything about its elements, so FreeItem () is effectively a NOP. If you want vector elements to free automatically occupied memory upon vector destruction you should create a derived class which should provide its own FreeItem () method (see csStrVector for a example).

`csVector(int ilimit = 8, int ithreshold = 16)`
  Initialize object to hold initially 'ilimit' elements, and increase storage by 'ithreshold' each time the upper bound is exceeded

`virtual ~csVector()`
  Destroy the vector object

`inline csSome& operator [] (int n)`
  Get a reference to n-th element

`inline csSome& Get(int n)`
  Same but doesn't call SetLength () in the event n is out of bounds

`void SetLength(int n)`
  Set vector length to n

`inline int Length()`
  Query vector length

`int Find(csSome which)`
  Find a element in array and return its index (or -1 if not found)

`int FindKey(csConstSome value)`
  Find a element by key (using Equal method)

`inline void Push(csSome what)`
  Push a element on 'top' of vector

`inline csSome Pop()`
  Pop a element from vector 'top'

`bool Delete(int n)`
  Delete element number 'n' from vector

`void DeleteAll()`
  Delete all elements

`bool Insert(int n, csSome Item)`
  Insert element 'Item' before element 'n'

`virtual bool FreeItem(csSome Item)`
  Virtual function which frees a vector element; returns success status

`virtual bool Equal(csSome Item, csConstSome Key)`
  Compare a element with given key for equality

Direct child classes:
  csVertexVector
  csStrVector
  csObjVector
  csCleanup
  PrvINIbranch

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de