ROOT_Application
2.0
C++ Core modules and GUIStock
|
Define template class policies for ordering the data in a vector. More...
#include <vector>
#include <algorithm>
Go to the source code of this file.
Data Structures | |
class | VecChronologic< T > |
Implements the functions related to the order of the data in the vector. More... | |
class | VecNoChronologic< T > |
Implements the functions related to the order of the data in the vector. More... | |
Enumerations | |
enum | EPChrono { CHRONO = true, NO_CHRONO = false } |
Define convenient name for the chronology, makes algorithms clearer. More... | |
Define template class policies for ordering the data in a vector.
The aim of this part is to write algorithms which are independent of the internal ordering in the vector.
If later, for efficiency reason, a reverse ordering is preferred for some of the indicators
everything should work the same.
2 class templates:
Define functions for always getting chronological or non-chronological iteration
Assuming than the vector is initially stored correctly (at its creation usually), a template class policy makes easy to:
Because they are templates, many operations are checked at compile-time.
For instance there is no need to revert the data of a vector (costly operation), if the order is already correct.
In sending iterators to the vector, it could be used with a list as well ?
Maybe, could return an appropriate iterator : begin_chrono
last modified:
Definition in file PolicyChronologic.h.
enum EPChrono |
Define convenient name for the chronology, makes algorithms clearer.
Enumerator | |
---|---|
CHRONO | |
NO_CHRONO |
Definition at line 38 of file PolicyChronologic.h.