#include <YCPList.h>
Inheritance diagram for YCPListRep:

Public Member Functions | |
| int | size () const |
| void | reserve (int size) |
| bool | isEmpty () const |
| void | add (const YCPValue &value) |
| void | set (const int n, const YCPValue &value) |
| void | remove (const int n) |
| void | swap (int x, int y) |
| bool | contains (const YCPValue &value) const |
| void | sortlist () |
| void | lsortlist () |
| void | fsortlist (const YCPCodeCompare &cmp) |
| virtual const YCPElementRep * | shallowCopy () const |
| YCPList | functionalAdd (const YCPValue &value, bool prepend=false) const |
| YCPValue | value (int n) const |
| YCPOrder | compare (const YCPList &v) const |
| string | toString () const |
| std::ostream & | toStream (std::ostream &str) const |
| YCPValueType | valuetype () const |
| string | commaList () const |
Protected Member Functions | |
| YCPListRep () | |
| ~YCPListRep () | |
Private Attributes | |
| vector< YCPValue > | elements |
Friends | |
| class | YCPList |
|
|
Creates a new and empty list of type [ value ] |
|
|
Cleans up. |
|
|
Appends a value to the list. Takes over the memory management of that value. Use YCPElementRep, if you need it yourself. |
|
|
Helper function used by this class and by YCPTermRep that creates a comma separated string representation of the members string representations. |
|
|
Compares two YCPLists for equality, greaterness or smallerness. The relation is lexicographically with respect to the list elements, i.e. elementwise comparison up to the shorter length. (( [ ] == [ ] ) == true ) (( [ 1, 2, 3 ] > [ 1, 2 ] ) == true ) (( [ 1, 2 ] > [ 1, 1, 1 ] ) == true ) (( [ 1, "string" ] > [ 1, 1, 1 ] ) == true ) (( [ 1, "string_long" ] > [ 1, "string", 1 ] ) == true ) (( [ 1 ] < [ { integer number = 2; return number; } ] ) == true ) int/int (( [ 1 ] > [ { integer number = 2; } ] ) == true ) int/nil
|
|
|
Returns true if the list contains the value, otherwise false. |
|
|
Sorts the list according to a comparison function. This function changes the list. |
|
||||||||||||
|
Creates a new list, that is identical to this one with but one new value appended. Doesn't change this list.
|
|
|
Returns true, if this list is empty. |
|
|
Sorts the list according to the locale. This function changes the list. |
|
|
Remove a value from the list. |
|
|
Reserves a number of elements in the list. |
|
||||||||||||
|
Sets a value in the list. Takes over the memory management of that value. Use YCPElementRep, if you need it yourself. |
|
|
Creates a copy of this list, i.e. creates a new list with the same elements as this one. The elements themselves are not copied, but only cloned! Reimplemented from YCPElementRep. |
|
|
Returns the number of elements in the list. |
|
|
Sorts the list. This function changes the list. |
|
||||||||||||
|
Exchanges the elements at the indices x and y. This function changes the list. |
|
|
Output value as bytecode to stream Implements YCPElementRep. |
|
|
Returns an ASCII representation of the list. Lists are denoted by comma separated values enclosed by square brackets. Implements YCPElementRep. |
|
|
Returns the n'th value of the list whereas 0 <= n < size(). |
|
|
Returns YT_LIST. See YCPValueRep::type. Implements YCPValueRep. |
|
|
|
|
|
|
1.4.6