ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Enumerations
PolicyChronologic.h File Reference

Define template class policies for ordering the data in a vector. More...

#include <vector>
#include <algorithm>
Include dependency graph for PolicyChronologic.h:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

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:

Id:
PolicyChronologic.h 511 2014-12-07 15:42:15Z martinml

Definition in file PolicyChronologic.h.

Enumeration Type Documentation

enum EPChrono

Define convenient name for the chronology, makes algorithms clearer.

Enumerator
CHRONO 
NO_CHRONO 

Definition at line 38 of file PolicyChronologic.h.