Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
ExpandableArray< T > Class Template Reference

#include </home/casse/Dev/elm/src/concepts.h>

+ Inheritance diagram for ExpandableArray< T >:

Public Member Functions

void shrink (int length)
 
void insert (int index, const T &item)
 
void insert (const Iterator &iter, const T &item)
 
void removeAt (int index)
 
void removeAt (const Iterator &iter)
 
- Public Member Functions inherited from MutableArray< T >
void shrink (int length)
 
void set (int index, const T &item)
 
void set (const Iterator &iter, const T &item)
 
T & get (int index)
 
T & operator[] (int index)
 
- Public Member Functions inherited from Array< T >
int length (void)
 
const T & get (int index) const
 
int indexOf (const T &value, int start=0) const
 
int lastIndexOf (const T &value, int start=-1) const
 
const T & operator[] (int index) const
 
- Public Member Functions inherited from Collection< T >
int count (void)
 
bool contains (const T &item)
 
template<template< class _ > class C>
bool containsAll (const C< T > &collection)
 
bool isEmpty (void)
 
 operator bool (void)
 
Iter begin (void) const
 
Iter end (void) const
 
bool equals (const Collection &coll)
 
bool operator== (const Collection &coll)
 
bool operator!= (const Collection &coll)
 
- Public Member Functions inherited from MutableCollection< T >
MutableIter< T > begin ()
 
MutableIter< T > end ()
 
void clear (void)
 
void add (const T &item)
 
void addAll (const Collection< T > &items)
 
void remove (const T &item)
 
void removeAll (const Collection< T > &items)
 
void remove (const Iterator< T > &iter)
 
MutableCollection< T > & operator+= (const T &item)
 
MutableCollection< T > & operator-= (const T &item)
 
void copy (const Collection< T > &items)
 
MutableCollectionoperator= (const Collection< T > &c)
 

Additional Inherited Members

- Public Types inherited from Collection< T >
typedef T t
 
typedef Collection< T > self_t
 
- Static Public Attributes inherited from Collection< T >
static const Collection null
 
static const Collection< T > null
 

Detailed Description

template<class T>
class elm::concept::ExpandableArray< T >

This concept provides mutable arrays.

Parameters
TType of the items in the array.
Implemented by:

Member Function Documentation

◆ insert() [1/2]

void insert ( const Iterator iter,
const T &  item 
)

Insert an item in the array. The following items are shifted to the upper indexes.

Parameters
iterIterator on the location to insert to.
itemItem to insert.

◆ insert() [2/2]

void insert ( int  index,
const T &  item 
)

Insert an item in the array. The following items are shifted to the upper indexes.

Parameters
indexIndex to insert to.
itemItem to insert.

◆ removeAt() [1/2]

void removeAt ( const Iterator iter)

Remove the item at the given index. Following items are shift to the lower indexes.

Parameters
iterIterator on the item to remove.

◆ removeAt() [2/2]

void removeAt ( int  index)

Remove the item at the given index. Following items are shift to the lower indexes.

Parameters
indexIndex of the item to remove.

◆ shrink()

void shrink ( int  length)

Shrink the size of the array.

Parameters
lengthNew length of the array (less than the current length).

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