![]() |
Apama
9.12.0.5
|
A list class which implements many of the functions on std::vector. More...
#include <sag_connectivity_cpp.hpp>
Inherits sag_underlying_vector_t.
Classes | |
| struct | _iterator |
| Forward/reverse and const/non-const iterators are implemented using this class. More... | |
Public Types | |
| typedef _iterator< data_t, sag_underlying_data_t * > | iterator |
| The type of iterators over a mutable list. More... | |
| typedef _iterator< const data_t, const sag_underlying_data_t * > | const_iterator |
| The type of iterators over a const list. More... | |
Public Member Functions | |
| list_t () | |
| Construct an empty list. More... | |
| list_t (size_t n) | |
| Create a list with (at least) the specified capacity. More... | |
| ~list_t () | |
| Free the underlying list. More... | |
| list_t & | operator= (list_t &&other) |
| Move assignment operator. More... | |
| list_t (list_t &&other) | |
| Move construction. More... | |
| void | swap (list_t &&other) |
| Swap the contents of this list with other. More... | |
| list_t | copy () const |
| Return a deep copy of this list. More... | |
| bool | operator== (const list_t &other) const |
| Returns true if this list is deep equals to other list. More... | |
| bool | operator!= (const list_t &other) const |
| Returns false if this list is deep equals to other list. More... | |
| iterator | begin () |
| Forward iterator begin. More... | |
| iterator | end () |
| Forward iterator end. More... | |
| const_iterator | begin () const |
| Forward const_iterator begin. More... | |
| const_iterator | end () const |
| Forward const_iterator end. More... | |
| const_iterator | cbegin () const |
| Forward const_iterator begin. More... | |
| const_iterator | cend () const |
| Forward const_iterator end. More... | |
| iterator | rbegin () |
| Reverse iterator begin. More... | |
| iterator | rend () |
| Reverse iterator end. More... | |
| const_iterator | rbegin () const |
| Reverse const_iterator begin. More... | |
| const_iterator | rend () const |
| Reverse const_iterator end. More... | |
| size_t | size () const |
| Return the number of items in this list. More... | |
| bool | empty () const |
| Returns true if there are no items in this list. More... | |
| const data_t & | operator[] (size_t n) const |
| Returns a reference to the data_t at position n. More... | |
| data_t & | operator[] (size_t n) |
| Returns a reference to the data_t at position n. More... | |
| const data_t & | front () const |
| Returns a reference to the data_t at position 0 Throws std::runtime_error if the list is empty. More... | |
| const data_t & | back () const |
| Returns a reference to the data_t at position size()-1 Throws std::runtime_error if the list is empty. More... | |
| data_t & | front () |
| Returns a reference to the data_t at position 0 Throws std::runtime_error if the list is empty. More... | |
| data_t & | back () |
| Returns a reference to the data_t at position size()-1 Throws std::runtime_error if the list is empty. More... | |
| void | reserve (size_t n) |
| Ensure the capacity is (at least) n. More... | |
| void | clear () |
| Clear the list and free the underlying data structure (capacity is now 0) More... | |
| void | push_back (data_t &&d) |
| Add an item to the end of the list. More... | |
| void | pop_back () |
| Remove the last item in the list. More... | |
A list class which implements many of the functions on std::vector.
We don't guarantee exact method-for-method compatibility with any of the std types.
This class gives access methods to an ordered list of data_t.
This is moveable, but not implicitly copyable. If you want to copy it use the .copy() method. If you want to move it use std::move().
The list is implemented as an array with amortized doubling. Modifying the contents will invalidate any iterators you have and any references that you have to the underlying structure.
| typedef _iterator<const data_t, const sag_underlying_data_t *> com::softwareag::connectivity::list_t::const_iterator |
The type of iterators over a const list.
| typedef _iterator<data_t, sag_underlying_data_t *> com::softwareag::connectivity::list_t::iterator |
The type of iterators over a mutable list.
|
inline |
Construct an empty list.
|
explicit |
Create a list with (at least) the specified capacity.
|
inline |
Free the underlying list.
|
inline |
Move construction.
Other will be left as the empty list.
|
inline |
|
inline |
|
inline |
Forward iterator begin.
|
inline |
Forward const_iterator begin.
|
inline |
Forward const_iterator begin.
|
inline |
Forward const_iterator end.
| void com::softwareag::connectivity::list_t::clear | ( | ) |
Clear the list and free the underlying data structure (capacity is now 0)
|
inline |
Return a deep copy of this list.
|
inline |
Returns true if there are no items in this list.
|
inline |
Forward iterator end.
|
inline |
Forward const_iterator end.
|
inline |
Returns a reference to the data_t at position 0 Throws std::runtime_error if the list is empty.
|
inline |
Returns a reference to the data_t at position 0 Throws std::runtime_error if the list is empty.
|
inline |
Returns false if this list is deep equals to other list.
Move assignment operator.
Other will be left as the empty list and our previous contents freed.
| bool com::softwareag::connectivity::list_t::operator== | ( | const list_t & | other | ) | const |
Returns true if this list is deep equals to other list.
| const data_t& com::softwareag::connectivity::list_t::operator[] | ( | size_t | n | ) | const |
| data_t& com::softwareag::connectivity::list_t::operator[] | ( | size_t | n | ) |
| void com::softwareag::connectivity::list_t::pop_back | ( | ) |
Remove the last item in the list.
| void com::softwareag::connectivity::list_t::push_back | ( | data_t && | d | ) |
|
inline |
Reverse iterator begin.
|
inline |
Reverse const_iterator begin.
|
inline |
Reverse iterator end.
|
inline |
Reverse const_iterator end.
|
inline |
Ensure the capacity is (at least) n.
|
inline |
Return the number of items in this list.
|
inline |
Swap the contents of this list with other.