ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Protected Member Functions
VecChronologic< T > Class Template Reference

Implements the functions related to the order of the data in the vector. More...

#include <PolicyChronologic.h>

Protected Member Functions

EPChrono bpolicy () const
 Return the current chronology policy, of type EPChrono. More...
 
std::string policy () const
 For printing info only. More...
 
Implementation of functions dependent of the policy
void order_impl (std::vector< T > &vec, EPChrono b_chronologic)
 Policy implementation of Order(). More...
 
const T & chronologic_at_impl (const std::vector< T > &vec_ordered, unsigned int position) const
 Policy implementation of ChronologicAt() More...
 
const T & no_chronologic_at_impl (const std::vector< T > &vec_ordered, unsigned int position) const
 Policy implementation of NoChronologicalAt() More...
 
void Erase_LastChrono (std::vector< T > &vec_ordered)
 Delete last chronological data, last in vector in this case. More...
 
void AddChronoToList (std::vector< T > &vec_ordered, const std::vector< T > &new_vec, const int first_to_skip)
 Insert the new_vec vector at the end (chronologically) of vec_ordered. More...
 
time_t FirstChronologic (const std::vector< T > &vec_ordered) const
 Return dates of the first and last (chronologically) elements. More...
 
time_t LastChronologic (const std::vector< T > &vec_ordered) const
 

Detailed Description

template<class T>
class VecChronologic< T >

Implements the functions related to the order of the data in the vector.


This class assumes the data are stored in a chronological order

Definition at line 49 of file PolicyChronologic.h.

Member Function Documentation

template<class T >
void VecChronologic< T >::AddChronoToList ( std::vector< T > &  vec_ordered,
const std::vector< T > &  new_vec,
const int  first_to_skip 
)
inlineprotected

Insert the new_vec vector at the end (chronologically) of vec_ordered.

Called by ListDataStock::AddToList

Precondition
new_vec must be a correctly ordered vector, with ListDataStock::GetVectorData for instance
Parameters
vec_orderedinitial vector
new_vecvector to append to vec_ordered
first_to_skipskip the first data of new_vec (less recent)

Definition at line 104 of file PolicyChronologic.h.

template<class T >
EPChrono VecChronologic< T >::bpolicy ( ) const
inlineprotected

Return the current chronology policy, of type EPChrono.

Definition at line 53 of file PolicyChronologic.h.

References CHRONO.

template<class T >
const T& VecChronologic< T >::chronologic_at_impl ( const std::vector< T > &  vec_ordered,
unsigned int  position 
) const
inlineprotected

Policy implementation of ChronologicAt()

Definition at line 82 of file PolicyChronologic.h.

template<class T >
void VecChronologic< T >::Erase_LastChrono ( std::vector< T > &  vec_ordered)
inlineprotected

Delete last chronological data, last in vector in this case.

Parameters
vec_orderedvector to modify

Definition at line 93 of file PolicyChronologic.h.

template<class T >
time_t VecChronologic< T >::FirstChronologic ( const std::vector< T > &  vec_ordered) const
inlineprotected

Return dates of the first and last (chronologically) elements.

Definition at line 112 of file PolicyChronologic.h.

template<class T >
time_t VecChronologic< T >::LastChronologic ( const std::vector< T > &  vec_ordered) const
inlineprotected

Definition at line 113 of file PolicyChronologic.h.

template<class T >
const T& VecChronologic< T >::no_chronologic_at_impl ( const std::vector< T > &  vec_ordered,
unsigned int  position 
) const
inlineprotected

Policy implementation of NoChronologicalAt()

Definition at line 87 of file PolicyChronologic.h.

template<class T >
void VecChronologic< T >::order_impl ( std::vector< T > &  vec,
EPChrono  b_chronologic 
)
inlineprotected

Policy implementation of Order().

Reorder the vector, in the order given by b_chronologic.
If the policy is the same as the order, nothing is done.
This test is done at compile time.

Parameters
vecvector to reorder
b_chronologicindicates in which order the vector has been filled

Definition at line 67 of file PolicyChronologic.h.

References CHRONO.

template<class T >
std::string VecChronologic< T >::policy ( ) const
inlineprotected

For printing info only.

Definition at line 55 of file PolicyChronologic.h.


The documentation for this class was generated from the following file: