Class Reference intList

The intList class provides a list of integer numbers. More...

Member

intList( )
intList( intList list )
void append(int value)
int at(int pos)
bool contains(int value)
void insert(int pos, int value)
int indexOf(int value, int index=0)
int removeAll(int value)
void removeAt(int pos)
int size()
void set(int pos, int value)
void swap(int pos1, int pos2)

Detailed Description

The intList class provides a list of integer numbers. In LayoutEditor C++ Macros this class is identical with an array of integer ( int a[count]; ).

Member Function Documentation


intList::intList( )

creates a intList


intList::intList( intList list )

creates a intList with copied data from list


void intList::append(int value)

Insert value at the end of the list.


int intList::at(int pos)

Returns: integer at the postion pos


bool intList::contains(int value)

Returns: true if the intList contains the number value. Otherwise false is returned.


void intList::insert(int pos, int value)

value is added at position pos. All entries afterwards are move by one position.


int intList::indexOf(int value, int index=0)

Returns: the index position of the first occurrence of the integer value in this list, searching forward from index position from. Returns -1, if value is not found.


int intList::removeAll(int value)

Removes all occurrences of value in the list and returns the number of entries removed.


void intList::removeAt(int pos)

position pos is removed from the list


int intList::size()

Returns: number of integers in the list


void intList::set(int pos, int value)

Sets the posth entry of the list to value. The first entry of the list starts with 0. It will have no effect, if the list did not have a size of pos.


void intList::swap(int pos1, int pos2)

Swaps the value at pos1 and pos2