sequence_model_t Class Reference
[Sequence Model]

#include <sequence_model.hpp>

List of all members.


Detailed Description

Todo:
Currently not type-homogenous, as it stores values using any_regular_t. This should be resolved, as the sequence is intended to be so.
Todo:
There is still much functionality missing from this implementation. Consider the other BackInsertionSequence concept functions and add them (erase, pop_back, etc.)

Definition at line 56 of file sequence_model.hpp.


Public Types

typedef model_type::const_iterator const_iterator
typedef dirty_value< value_typedirty_type
typedef boost::function< void(iterator,
iterator)> 
inplace_operation_proc_t
typedef model_type::iterator iterator
typedef std::vector< dirty_typemodel_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_typeback () 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_typeoperator[] (size_type n) const
void pop_back ()
void push_back (const value_type &x)
const selection_typeselection () 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

const_iterator for the sequence_model_t

Definition at line 76 of file sequence_model.hpp.

typedef dirty_value<value_type> dirty_type

dirty_type for the sequence_model_t

Definition at line 68 of file sequence_model.hpp.

typedef boost::function<void (iterator, iterator)> inplace_operation_proc_t

inplace_operation_proc_t for the sequence_model_t

Definition at line 80 of file sequence_model.hpp.

typedef model_type::iterator iterator

iterator for the sequence_model_t

Definition at line 74 of file sequence_model.hpp.

typedef std::vector<dirty_type> model_type

model_type for the sequence_model_t

Definition at line 70 of file sequence_model.hpp.

typedef boost::function<void (size_type pos, size_type n)> monitor_insert_proc_t

monitor_insert_proc_t for the sequence_model_t

Definition at line 84 of file sequence_model.hpp.

typedef boost::function<void (size_type index)> monitor_set_proc_t

monitor_set_proc_t for the sequence_model_t

Definition at line 86 of file sequence_model.hpp.

selection_type for the sequence_model_t

Definition at line 72 of file sequence_model.hpp.

typedef model_type::size_type size_type

size_type for the sequence_model_t

Definition at line 78 of file sequence_model.hpp.

typedef any_regular_t value_type

value_type for the sequence_model_t

Definition at line 66 of file sequence_model.hpp.


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,
first,
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 (  ) 

Pushes an element onto the back of the sequence. It will also notify attached views of the new element.

void push_back ( const value_type x  ) 

Pushes an element onto the back of the sequence. It will also notify attached views of the new element.

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 
)

Sets an element at the specified index to the specified value. It will also notify attached views of the modified element.

size_type size (  )  const

Same behavior as std::vector::size

Definition at line 99 of file sequence_model.hpp.


Member Data Documentation

const size_type npos [static]

A globally defined index with the semantic meaning of "the end of the sequence".

Definition at line 89 of file sequence_model.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google