Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csNamedObjectVector Class Reference

This class is intended as a wrapper around an existing csVector. More...

#include <nobjvec.h>

List of all members.

Public Methods

 csNamedObjectVector ()
 constructor.

int GetIndexByName (const char *name) const
 Return the index of the element with the given name, or -1.

iObjectFindByName (const char *name) const
 Find an object by name.

void SetLength (int n)
 Set the length of this vector.

int Length () const
 Return the length of this vector.

int Limit () const
 Return the limit of this vector.

void Exchange (int n1, int n2)
 Exchange two elements of the vector.

void QuickSort (int Left, int Right, int Mode=0)
 Quick-sort the elements, using the given mode.

void QuickSort (int Mode=0)
 Quick-sort the elements, using the given mode.

int Find (iObject *obj) const
 Find an element and return its index.

int FindKey (csConstSome Key, int Mode=0) const
 Find an element using the given key.

int FindSortedKey (csConstSome Key, int Mode=0) const
 Find an element using the given key. Expects the elements to be sorted.

iObjectPop ()
 Pop an element from the vector.

iObjectTop () const
 Return the topmost element.

bool Delete (int n)
 Delete an element from the vector.

bool Delete (iObject *obj)
 Delete an element from the vector.

void DeleteAll ()
 Delete all elements.

iObjectGet (int n) const
 Return the pointer to an element.

iObjectoperator[] (int n) const
 Return the pointer to an element.

void SetVector (void *vec)

Static Public Methods

int Compare (csSome Item1, csSome Item2, int Mode)
int CompareKey (csSome Item, csConstSome Key, int Mode)


Detailed Description

This class is intended as a wrapper around an existing csVector.

It assumes that the vector contains iBase objects which implement the iObject interface. This class allows access to the vector as if it was a vector of iObject's. However, it is not possible to add objects to the vector though this interface, because this interface does not know which type of objects is actually contained.

@@ the current implementation uses SCF_QUERY_INTERFACE everywhere. This is slow and also the refcount is not handled correctly.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000