Class List represents list objects.
More...
#include <list.h>
Public Member Functions |
| | List () |
| | Creates an empty list.
|
| virtual | ~List () |
| | List destructor.
|
| | List (const DPtr &first, const DPtr &second=DPtr::bottom, const DPtr &third=DPtr::bottom, const DPtr &fourth=DPtr::bottom) |
| | Creates a list with several objects.
|
| | List (const List &argument) |
| | Creates a semantical copy of the list.
|
| virtual void | destroy () |
| | Destroys the current instance.
|
| virtual std::string | get_type_name () const |
| | Returns the type of the object.
|
| const DPtr & | first () const |
| | Provides a direct access to the first child (if exists)
|
| DPtr & | first () |
| | Provides a direct access to the first child (if exists)
|
| const DPtr & | second () const |
| | Provides a direct access to the second child (if exists)
|
| DPtr & | second () |
| | Provides a direct access to the second child (if exists)
|
| const DPtr & | third () const |
| | Provides a direct access to the third child (if exists)
|
| DPtr & | third () |
| | Provides a direct access to the third child (if exists)
|
| const DPtr & | fourth () const |
| | Provides a direct access to the fourth child (if exists)
|
| DPtr & | fourth () |
| | Provides a direct access to the fourth child (if exists)
|
| SPtr< List > | map (MapFunction function, void *extra=0) |
| | Applies a function to all the elements of the given list and returns the resulting new list.
|
| DPtr & | at (size_t index) |
| | Synonym for the square brackets operator (inefficient)
|
| const DPtr & | at (size_t index) const |
| | Synonym for the square brackets operator (inefficient)
|
| const DPtr & | operator[] (size_t index) const |
| | Provides a direct access to a child (inefficient)
|
| DPtr & | operator[] (size_t index) |
| | Provides a direct access to a child (inefficient)
|
| void | erase (List::iterator entry) |
| | Erases a list entry.
|
| virtual Type | get_type () const |
| | Returns the enumerated type of the object.
|
| void | push_back_compare (const DPtr &entry, DPtrCompare compare) |
| | Adds an element before the given position if no equal element is already inside the list.
|
| virtual std::string | to_string () const |
| | Converts the object to a non-formatted string.
|
Detailed Description
Class List represents list objects.
Constructor & Destructor Documentation
| crp::List::List |
( |
| ) |
[inline] |
Creates an empty list.
- Parameters:
-
| list | Statement which should be treated as a list |
| virtual crp::List::~List |
( |
| ) |
[virtual] |
Creates a list with several objects.
- Parameters:
-
| first | |
| second | |
| third | |
| fourth | |
| crp::List::List |
( |
const List & |
argument | ) |
[inline] |
Creates a semantical copy of the list.
- Parameters:
-
| argument | Statement which should be treated as a list |
Member Function Documentation
| DPtr& crp::List::at |
( |
size_t |
index | ) |
[inline] |
Synonym for the square brackets operator (inefficient)
- Parameters:
-
- Returns:
- Value of the child
| const DPtr& crp::List::at |
( |
size_t |
index | ) |
const [inline] |
Synonym for the square brackets operator (inefficient)
- Parameters:
-
- Returns:
- Value of the child
| virtual void crp::List::destroy |
( |
| ) |
[inline, virtual] |
Destroys the current instance.
| void crp::List::erase |
( |
List::iterator |
entry | ) |
[inline] |
Erases a list entry.
- Parameters:
-
| DPtr& crp::List::first |
( |
| ) |
[inline] |
Provides a direct access to the first child (if exists)
- Returns:
- First child
| const DPtr& crp::List::first |
( |
| ) |
const [inline] |
Provides a direct access to the first child (if exists)
- Returns:
- First child
| const DPtr& crp::List::fourth |
( |
| ) |
const [inline] |
Provides a direct access to the fourth child (if exists)
- Returns:
- First child
| DPtr& crp::List::fourth |
( |
| ) |
[inline] |
Provides a direct access to the fourth child (if exists)
- Returns:
- First child
| virtual Type crp::List::get_type |
( |
| ) |
const [inline, virtual] |
Returns the enumerated type of the object.
- Returns:
- Type of the object
Reimplemented from crp::Object.
| virtual std::string crp::List::get_type_name |
( |
| ) |
const [inline, virtual] |
Returns the type of the object.
- Returns:
- Type of the object
Reimplemented from crp::Object.
Applies a function to all the elements of the given list and returns the resulting new list.
- Parameters:
-
| function | Function to apply |
| extra | Extra data for the function New list |
| DPtr& crp::List::operator[] |
( |
size_t |
index | ) |
[inline] |
Provides a direct access to a child (inefficient)
- Parameters:
-
- Returns:
- Value of the child
| const DPtr& crp::List::operator[] |
( |
size_t |
index | ) |
const [inline] |
Provides a direct access to a child (inefficient)
- Parameters:
-
- Returns:
- Value of the child
| void crp::List::push_back_compare |
( |
const DPtr & |
entry, |
|
|
DPtrCompare |
compare |
|
) |
| |
Adds an element before the given position if no equal element is already inside the list.
- Parameters:
-
| entry | Entry to insert |
| compare | Comparison function |
| DPtr& crp::List::second |
( |
| ) |
[inline] |
Provides a direct access to the second child (if exists)
- Returns:
- First child
| const DPtr& crp::List::second |
( |
| ) |
const [inline] |
Provides a direct access to the second child (if exists)
- Returns:
- First child
| const DPtr& crp::List::third |
( |
| ) |
const [inline] |
Provides a direct access to the third child (if exists)
- Returns:
- First child
| DPtr& crp::List::third |
( |
| ) |
[inline] |
Provides a direct access to the third child (if exists)
- Returns:
- First child
| virtual std::string crp::List::to_string |
( |
| ) |
const [inline, virtual] |
Converts the object to a non-formatted string.
- Returns:
- String representation of the object
Reimplemented from crp::Object.
The documentation for this class was generated from the following file: