SSortedVector Class Template Reference
[Utility Classes and Functions]

#include <support/SortedVector.h>

Inheritance diagram for SSortedVector:

SAbstractSortedVector List of all members.

Detailed Description

template<class TYPE>
class SSortedVector< TYPE >

Templatized vector (array) that is kept in sorted order.

This is similar to SVector, except the values it contains are always sorted by their natural order.


Public Types

typedef TYPE value_type

Public Member Functions

ssize_t AddItem (const TYPE &item, bool *added=NULL)
const TYPE * Array () const
size_t Capacity () const
ssize_t CeilIndexOf (const TYPE &item) const
size_t CountItems () const
ssize_t FloorIndexOf (const TYPE &item) const
bool GetIndexOf (const TYPE &item, size_t *index) const
bool HasItem (const TYPE &item) const
ssize_t IndexOf (const TYPE &item) const
const TYPE & ItemAt (size_t i) const
void MakeEmpty ()
SSortedVector< TYPE > & operator= (const SSortedVector< TYPE > &o)
const TYPE & operator[] (size_t i) const
ssize_t RemoveItemFor (const TYPE &item)
void RemoveItemsAt (size_t index, size_t count=1)
void SetCapacity (size_t total_space)
void SetExtraCapacity (size_t extra_space)
 SSortedVector (const SSortedVector< TYPE > &o)
 SSortedVector ()
void Swap (SSortedVector< TYPE > &o)
virtual ~SSortedVector ()

Static Public Member Functions

static void MoveAfter (SSortedVector< TYPE > &to, SSortedVector< TYPE > &from, size_t count)
static void MoveBefore (SSortedVector< TYPE > &to, SSortedVector< TYPE > &from, size_t count)

Protected Member Functions

virtual void PerformAssign (void *to, const void *from, size_t count) const
virtual SValue PerformAsValue (const void *from, size_t count) const
virtual int32_t PerformCompare (const void *d1, const void *d2) const
virtual void PerformConstruct (void *base, size_t count) const
virtual void PerformCopy (void *to, const void *from, size_t count) const
virtual void PerformDestroy (void *base, size_t count) const
virtual bool PerformLessThan (const void *d1, const void *d2) const
virtual void PerformMoveAfter (void *to, void *from, size_t count) const
virtual void PerformMoveBefore (void *to, void *from, size_t count) const
virtual void PerformReplicate (void *to, const void *protoElement, size_t count) const
virtual status_t PerformSetFromValue (void *to, const SValue &value, size_t count)


Member Typedef Documentation

typedef TYPE value_type
 


Constructor & Destructor Documentation

SSortedVector  )  [inline]
 

SSortedVector const SSortedVector< TYPE > &  o  )  [inline]
 

~SSortedVector  )  [inline, virtual]
 


Member Function Documentation

ssize_t AddItem const TYPE &  item,
bool *  added = NULL
[inline]
 

const TYPE * Array  )  const [inline]
 

Reimplemented from SAbstractVector.

size_t Capacity  )  const [inline]
 

Reimplemented from SAbstractVector.

ssize_t CeilIndexOf const TYPE &  item  )  const [inline]
 

size_t CountItems  )  const [inline]
 

Reimplemented from SAbstractVector.

ssize_t FloorIndexOf const TYPE &  item  )  const [inline]
 

bool GetIndexOf const TYPE &  item,
size_t *  index
const [inline]
 

bool HasItem const TYPE &  item  )  const [inline]
 

ssize_t IndexOf const TYPE &  item  )  const [inline]
 

const TYPE & ItemAt size_t  i  )  const [inline]
 

void MakeEmpty  )  [inline]
 

Reimplemented from SAbstractVector.

static void MoveAfter SSortedVector< TYPE > &  to,
SSortedVector< TYPE > &  from,
size_t  count
[static]
 

static void MoveBefore SSortedVector< TYPE > &  to,
SSortedVector< TYPE > &  from,
size_t  count
[static]
 

SSortedVector< TYPE > & operator= const SSortedVector< TYPE > &  o  )  [inline]
 

const TYPE & operator[] size_t  i  )  const [inline]
 

void PerformAssign void *  to,
const void *  from,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

SValue PerformAsValue const void *  from,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

int32_t PerformCompare const void *  d1,
const void *  d2
const [protected, virtual]
 

Implements SAbstractSortedVector.

void PerformConstruct void *  base,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

void PerformCopy void *  to,
const void *  from,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

void PerformDestroy void *  base,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

bool PerformLessThan const void *  d1,
const void *  d2
const [protected, virtual]
 

Implements SAbstractSortedVector.

void PerformMoveAfter void *  to,
void *  from,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

void PerformMoveBefore void *  to,
void *  from,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

void PerformReplicate void *  to,
const void *  protoElement,
size_t  count
const [protected, virtual]
 

Implements SAbstractVector.

status_t PerformSetFromValue void *  to,
const SValue value,
size_t  count
[protected, virtual]
 

Implements SAbstractVector.

ssize_t RemoveItemFor const TYPE &  item  )  [inline]
 

void RemoveItemsAt size_t  index,
size_t  count = 1
[inline]
 

Reimplemented from SAbstractVector.

void SetCapacity size_t  total_space  )  [inline]
 

Reimplemented from SAbstractVector.

void SetExtraCapacity size_t  extra_space  )  [inline]
 

Reimplemented from SAbstractVector.

void Swap SSortedVector< TYPE > &  o  )  [inline]
 


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