DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <Selection.hh>
Classes | |
class | IndexIterator |
Public Types | |
typedef vector< Item > | ItemVector |
Public Member Functions | |
Selection (const vector< Item > &items) | |
IndexIterator | indexBegin () const |
IndexIterator | indexEnd () const |
unsigned | numberOfNonSelectedItems () const |
unsigned | numberOfSelectedItems () const |
unsigned | numberOfItems () const |
IndexIterator | selectedIndexBegin () const |
IndexIterator | selectedIndexEnd () const |
IndexIterator | nonSelectedIndexBegin () const |
IndexIterator | nonSelectedIndexEnd () const |
ItemVector::const_iterator | selectedBegin () const |
ItemVector::const_iterator | selectedEnd () const |
ItemVector::const_iterator | nonSelectedBegin () const |
ItemVector::const_iterator | nonSelectedEnd () const |
bool | hasBeenAlreadySelectedOnce (unsigned index) const |
bool | allSelected () const |
unsigned | newSelection () |
const Item & | getItem (unsigned index) const |
void | select (unsigned index) |
void | print () |
Private Attributes | |
const ItemVector & | _items |
vector< unsigned > | _unselectedItemPool |
vector< unsigned > | _position |
unsigned | _selectedIndexStart |
A simple but efficient way to select items that were not selected before in a vector of items
Definition at line 30 of file Selection.hh.
typedef vector<Item> Diades::Utils::Selection< Item >::ItemVector |
Definition at line 33 of file Selection.hh.
|
inline |
Unique constructor
items | the vector of items that are under selection |
Definition at line 107 of file Selection.hh.
|
inline |
Definition at line 307 of file Selection.hh.
|
inline |
index | index of the item in the selection vector |
Definition at line 337 of file Selection.hh.
|
inline |
selection test
index | Index of an item in the vector |
Definition at line 294 of file Selection.hh.
References Diades::Utils::Selection< Item >::_selectedIndexStart.
|
inline |
Iterator of the first index (selected or not)
Definition at line 127 of file Selection.hh.
References Diades::Utils::Selection< Item >::IndexIterator::IndexIterator().
|
inline |
Iterator on the element after the last index (selected or not)
Definition at line 140 of file Selection.hh.
References Diades::Utils::Selection< Item >::IndexIterator::IndexIterator().
|
inline |
Get the index of an non-selected Item if such an item exists
Definition at line 322 of file Selection.hh.
References Diades::Utils::Selection< Item >::select().
|
inline |
Iterator of the first non-selected item
Definition at line 267 of file Selection.hh.
|
inline |
Iterator of the item after the last non-selected item
Definition at line 280 of file Selection.hh.
References Diades::Utils::Selection< Item >::_selectedIndexStart.
|
inline |
Iterator of the first non selected index
Definition at line 215 of file Selection.hh.
References Diades::Utils::Selection< Item >::IndexIterator::IndexIterator().
|
inline |
Iterator on the index after the last non selected index
Definition at line 228 of file Selection.hh.
References Diades::Utils::Selection< Item >::IndexIterator::IndexIterator().
|
inline |
The number of items
Definition at line 176 of file Selection.hh.
Referenced by Diades::Utils::Selection< Item >::numberOfSelectedItems().
|
inline |
The number of items not selected yet
Definition at line 152 of file Selection.hh.
References Diades::Utils::Selection< Item >::_selectedIndexStart.
Referenced by Diades::Utils::Selection< Item >::numberOfSelectedItems().
|
inline |
The number of items already selected once
Definition at line 164 of file Selection.hh.
References Diades::Utils::Selection< Item >::numberOfItems(), and Diades::Utils::Selection< Item >::numberOfNonSelectedItems().
|
inline |
print the internal state of the Selection object for debug only
Definition at line 365 of file Selection.hh.
References Diades::Utils::Selection< Item >::_selectedIndexStart.
|
inline |
Set the item of this index selected
Definition at line 348 of file Selection.hh.
References Diades::Utils::Selection< Item >::_selectedIndexStart.
Referenced by Diades::Utils::Selection< Item >::newSelection().
|
inline |
Iterator of the first selected item
Definition at line 241 of file Selection.hh.
References Diades::Utils::Selection< Item >::_selectedIndexStart.
|
inline |
Iterator of the item after the last selected item
Definition at line 254 of file Selection.hh.
|
inline |
Iterator of the first selected index
Definition at line 189 of file Selection.hh.
References Diades::Utils::Selection< Item >::IndexIterator::IndexIterator().
|
inline |
Iterator on the index after the last selected index
Definition at line 202 of file Selection.hh.
References Diades::Utils::Selection< Item >::IndexIterator::IndexIterator().
|
private |
Definition at line 37 of file Selection.hh.
|
private |
Definition at line 39 of file Selection.hh.
|
private |
Definition at line 40 of file Selection.hh.
Referenced by Diades::Utils::Selection< Item >::hasBeenAlreadySelectedOnce(), Diades::Utils::Selection< Item >::nonSelectedEnd(), Diades::Utils::Selection< Item >::numberOfNonSelectedItems(), Diades::Utils::Selection< Item >::print(), Diades::Utils::Selection< Item >::select(), and Diades::Utils::Selection< Item >::selectedBegin().
|
private |
Definition at line 38 of file Selection.hh.