|
Dev Essential
|
Utility class for observable named items where the order is important. More...
#include <access_vector.h>
Inherits TypeAccessVectorObserver< DDL_TYPE_TO_ACCESS >.
Public Types | |
| typedef DDL_TYPE_TO_ACCESS | access_type |
| local definition of the access type | |
| typedef std::shared_ptr< DDL_TYPE_TO_ACCESS > | value_type |
| local definition of the value type | |
| typedef std::vector< value_type > | container_type |
| local definition of the container type | |
| typedef container_type::iterator | iterator |
| local definition of the container iterator | |
| typedef container_type::const_iterator | const_iterator |
| local definition of the container const_iterator | |
| typedef TypeAccessVectorObserver< DDL_TYPE_TO_ACCESS > | parent_type |
| local definition of the parent type to register observer | |
| typedef TypeAccessVectorSubject< DDL_TYPE_TO_ACCESS > | observer_subject_type |
| local definition of the internal subject type | |
| typedef observer_subject_type::observer_type | observer_type |
| local definition of the observer type | |
| typedef parent_type::event_code_type | event_code_type |
| local definition of the eventcode type | |
| typedef parent_type::subject_type | subject_type |
| local definition of the subject type | |
Public Member Functions | |
| TypeAccessVector ()=delete | |
| no default CTOR! | |
| TypeAccessVector (TYPE_VALIDATOR_CLASS *validator, const std::string &validation_info) | |
| CTOR. | |
| virtual | ~TypeAccessVector () |
| DTOR. | |
| TypeAccessVector (TypeAccessVector &&other) | |
| move CTOR | |
| TypeAccessVector & | operator= (TypeAccessVector &&other) |
| move assignment operator | |
| TypeAccessVector (const TypeAccessVector &other) | |
| copies (deepcopy!) CTOR | |
| TypeAccessVector & | operator= (const TypeAccessVector &other) |
| copies (deepcopy!) and overwrite the current content. | |
| std::shared_ptr< const DDL_TYPE_TO_ACCESS > | get (size_t index) const |
get the item with the given index | |
| void | add (const DDL_TYPE_TO_ACCESS &type_to_add) |
| adds the given item | |
| void | insert (const size_t pos_idx, const DDL_TYPE_TO_ACCESS &type_to_add) |
| inserts the given item at the given pos | |
| void | emplace (DDL_TYPE_TO_ACCESS &&type_to_add) |
| emplace the given item | |
| void | remove (size_t index) |
| item to remove | |
| std::shared_ptr< DDL_TYPE_TO_ACCESS > | access (size_t index) |
| change access to an item | |
| size_t | getSize () const |
| Get the Size. | |
| iterator | begin () |
| the range based begin iterator | |
| iterator | end () |
| the range based end iterator | |
| const_iterator | cbegin () const |
| const begin iterator access | |
| const_iterator | cend () const |
| const end iterator access | |
| const_iterator | begin () const |
| range based begin operator for const access | |
| const_iterator | end () const |
| range based end operator for const access | |
| bool | operator== (const TypeAccessVector &other) const |
| equality operator. | |
| bool | operator!= (const TypeAccessVector &other) const |
| non equality operator. | |
| void | clear () |
| clears the list and remove this as observer | |
| void | popBack () |
| removes the last element if exists. | |
| void | modelChanged (event_code_type event_code, subject_type &subject_changed, const std::string &additional_info) |
| overrides the observers utility function. | |
Public Attributes | |
| friend | TYPE_VALIDATOR_CLASS |
| friend validator class | |
Utility class for observable named items where the order is important.
| DDL_TYPE_TO_ACCESS | the value type |
| TYPE_VALIDATOR_CLASS | the validator class to inform on changes |
|
inline |
CTOR.
| validator | the validator for name check! |
| validation_info | info for errors |
|
inline |
copies (deepcopy!) CTOR
| other | the other list |
|
inline |
change access to an item
| index | the item index |
|
inline |
adds the given item
| type_to_add | the item to add |
| throws | if a item with that name already exists |
|
inline |
the range based begin iterator
|
inline |
range based begin operator for const access
|
inline |
const begin iterator access
|
inline |
const end iterator access
|
inline |
emplace the given item
| type_to_add | the item to emplace |
| throws | if a item with that name already exists |
|
inline |
the range based end iterator
|
inline |
range based end operator for const access
|
inline |
get the item with the given index
| index | the item to find |
|
inline |
Get the Size.
|
inline |
inserts the given item at the given pos
| type_to_add | the item to insert |
| pos_idx | the pos where to insert the item |
| throws | if a item with that name already exists, or the pos_idx is invalid or out of range |
|
inline |
overrides the observers utility function.
| event_code | the internal event_code |
| subject_changed | the subject (these are the items of the list) |
| additional_info | the additional info (if any) |
|
inline |
non equality operator.
| other | the other TypeAccessList to compare this list to. |
|
inline |
copies (deepcopy!) and overwrite the current content.
| other | the other list |
|
inline |
move assignment operator
|
inline |
equality operator.
| other | the other TypeAccessList to compare this list to. |
|
inline |
removes the last element if exists.
| ddl::dd::Error | if it is empty. |
|
inline |
item to remove
| index | the item index to remove |