sequence_model_t Class Reference | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| typedef model_type::const_iterator | const_iterator |
| typedef dirty_value< value_type > | dirty_type |
| typedef boost::function< void(iterator, iterator)> | inplace_operation_proc_t |
| typedef model_type::iterator | iterator |
| typedef std::vector< dirty_type > | model_type |
| typedef boost::function< void(size_type pos, size_type n)> | monitor_insert_proc_t |
| typedef boost::function< void(size_type index)> | monitor_set_proc_t |
| typedef selection_t | selection_type |
| typedef model_type::size_type | size_type |
| typedef any_regular_t | value_type |
Public Member Functions | |
| void | attach_controller (any_sequence_controller_t &controller) |
| void | attach_view (any_sequence_view_t &view) |
| const value_type & | back () const |
| void | detach_controller (any_sequence_controller_t &controller) |
| void | detach_view (any_sequence_view_t &view) |
| bool | empty () const |
| void | erase (const selection_type &selection) |
| void | inplace_operation (const inplace_operation_proc_t &proc, size_type pos=0, size_type n=sequence_model_t::npos) |
| template<typename I> | |
| void | insert (size_type pos, I first, I last) |
| size_type | max_size () const |
| const value_type & | operator[] (size_type n) const |
| void | pop_back () |
| void | push_back (const value_type &x) |
| const selection_type & | selection () const |
| void | selection_append (const selection_t &selection) |
| void | selection_remove (const selection_t &selection) |
| void | selection_set (const selection_t &selection) |
| sequence_model_t (std::size_t count=0) | |
| void | set (size_type pos, const value_type &x) |
| size_type | size () const |
Static Public Attributes | |
| static const size_type | npos |
Member Typedef Documentation
| typedef model_type::const_iterator const_iterator |
| typedef dirty_value<value_type> dirty_type |
| typedef boost::function<void (iterator, iterator)> inplace_operation_proc_t |
| typedef model_type::iterator iterator |
| typedef std::vector<dirty_type> model_type |
| typedef boost::function<void (size_type pos, size_type n)> monitor_insert_proc_t |
| typedef boost::function<void (size_type index)> monitor_set_proc_t |
| typedef selection_t selection_type |
| typedef model_type::size_type size_type |
| typedef any_regular_t value_type |
Constructor & Destructor Documentation
| sequence_model_t | ( | std::size_t | count = 0 |
) | [explicit] |
default constructor, allowing for an initial size of the sequence to be specified
Definition at line 60 of file sequence_model.hpp.
Member Function Documentation
| void attach_controller | ( | any_sequence_controller_t & | controller | ) |
Attaches the requested controller to the sequence_model. Currently, however, this doesn't do anything on the back side.
| void attach_view | ( | any_sequence_view_t & | view | ) |
Used to attach an any_sequence_view_t to the sequence_model. Views into the model are notified of model changes through the concept requirements spelled out by the SequenceView concept.
| const value_type& back | ( | ) | const |
/return the element at the back of the model
Definition at line 114 of file sequence_model.hpp.
| void detach_controller | ( | any_sequence_controller_t & | controller | ) |
Detaches the requested controller from the sequence_model. Currently, however, this doesn't do anything on the back side.
| void detach_view | ( | any_sequence_view_t & | view | ) |
Detaches the requested view from the sequence_model.
| bool empty | ( | ) | const |
Same behavior as std::vector::empty
Definition at line 94 of file sequence_model.hpp.
| void erase | ( | const selection_type & | selection | ) |
Erases the elements within the specified selection
| void inplace_operation | ( | const inplace_operation_proc_t & | proc, | |
| size_type | pos = 0, |
|||
| size_type | n = sequence_model_t::npos | |||
| ) |
This function allows for the sequence model to be manipulated by an in-place algorithm. The model will keep track of those values that have been touched during the course of the operation, and will notify views of the updated values after the termination of the inplace operation procedure.
| void insert | ( | size_type | pos, | |
| I | first, | |||
| I | last | |||
| ) |
Inserts a set of elements before the specified index. It will also notify attached views of the inserted elements.
Definition at line 239 of file sequence_model.hpp.
| size_type max_size | ( | ) | const |
Same behavior as std::vector::max_size
Definition at line 104 of file sequence_model.hpp.
| const value_type& operator[] | ( | size_type | n | ) | const |
Same behavior as std::vector::operator[]
Definition at line 109 of file sequence_model.hpp.
| void pop_back | ( | ) |
| void push_back | ( | const value_type & | x | ) |
| const selection_type& selection | ( | ) | const |
/return the current selection state of the model
Definition at line 119 of file sequence_model.hpp.
| void selection_append | ( | const selection_t & | selection | ) |
Append an element to the selection set
| void selection_remove | ( | const selection_t & | selection | ) |
Remove an element from the selection set
| void selection_set | ( | const selection_t & | selection | ) |
Set the selection set
| void set | ( | size_type | pos, | |
| const value_type & | x | |||
| ) |
| size_type size | ( | ) | const |
Same behavior as std::vector::size
Definition at line 99 of file sequence_model.hpp.
Member Data Documentation
A globally defined index with the semantic meaning of "the end of the sequence".
Definition at line 89 of file sequence_model.hpp.
