All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SIM_ObjectArray Class Reference

Holds pointers to a number of SIM_Object objects. More...

#include <SIM_ObjectArray.h>

+ Inheritance diagram for SIM_ObjectArray:

Public Member Functions

 SIM_ObjectArray ()
virtual ~SIM_ObjectArray ()
SIM_ObjectfindObjectById (int objectid) const
int findPositionById (int objectid) const
void filter (const SIM_DataFilter &filter, SIM_ObjectArray &filtered) const
void filterConst (const SIM_DataFilter &filter, SIM_ConstObjectArray &filtered) const
- Public Member Functions inherited from SIM_PtrArraySorted< SIM_Object * >
 SIM_PtrArraySorted ()
 SIM_PtrArraySorted (typename UT_ValArray< SIM_Object * >::Comparator comparator)
virtual ~SIM_PtrArraySorted ()
void setComparator (typename UT_ValArray< SIM_Object * >::Comparator cmp)
void sort ()
exint size () const
void setSize (exint newsize)
void setCapacity (exint newcapacity)
exint entries () const
void entries (int newnumentries)
void resize (int newsize)
SIM_Objectoperator() (int index) const
SIM_Objectlast () const
int find (SIM_Object *ptr) const
bool operator== (const SIM_PtrArraySorted &cmp) const
bool containsAny (const SIM_PtrArraySorted &cmp) const
bool containsFully (const SIM_PtrArraySorted &cmp) const
void remove (int index)
void remove (SIM_Object *ptr)
void remove (const SIM_PtrArraySorted &src)
void keepOnly (const SIM_PtrArraySorted &src)
const SIM_PtrArraySortedoperator= (const SIM_PtrArraySorted &src)
int add (SIM_Object *ptr)
void set (const SIM_PtrArraySorted &src)
void setUnsorted (const UT_ValArray< SIM_Object * > &src, SIM_PtrArraySorted &duplicates)
void merge (const SIM_PtrArraySorted &src)
void mergeSelected (const SIM_PtrArraySorted &src, bool(*selectfunc)(SIM_Object *))
void appendUnsafe (SIM_Object *ptr)
const UT_ValArray< SIM_Object * > & getRawArray () const
UT_ValArray< SIM_Object * > & getRawArray ()

Static Public Member Functions

static int compareObjectId (SIM_Object *const *, SIM_Object *const *)

Detailed Description

Constructor & Destructor Documentation

SIM_ObjectArray::SIM_ObjectArray ( )

Definition at line 24 of file SIM_ObjectArray.h.

virtual SIM_ObjectArray::~SIM_ObjectArray ( )

Definition at line 28 of file SIM_ObjectArray.h.

Member Function Documentation

static int SIM_ObjectArray::compareObjectId ( SIM_Object *const ,
SIM_Object *const  

This function is used for sorting the objects in the array. It compares objects using the object id values.

void SIM_ObjectArray::filter ( const SIM_DataFilter filter,
SIM_ObjectArray filtered 
) const

Fills an array with all the objects in this array that match the supplied filter.

void SIM_ObjectArray::filterConst ( const SIM_DataFilter filter,
SIM_ConstObjectArray filtered 
) const

Fills an array with all the objects in this array that match the supplied filter.

SIM_Object* SIM_ObjectArray::findObjectById ( int  objectid) const

This function returns a pointer the the SIM_Object with the specified object id. If the object id is not found, it returns null.

int SIM_ObjectArray::findPositionById ( int  objectid) const

This function returns the index within the array of the object with the specified id. Returns -1 if objectid doesn't occur in the array.

The documentation for this class was generated from the following file: