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
VecNoChronologic< 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
 Return the policy as a string, for printing info. 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_no_ordered, unsigned int position) const
 Policy implementation of ChronologicalAt() More...
 
const T & no_chronologic_at_impl (const std::vector< T > &vec_no_ordered, unsigned int position) const
 Policy implementation of NoChronologicalAt() More...
 
void Erase_LastChrono (std::vector< T > &vec_no_ordered)
 Erase last chronological data, first in vector in this case. More...
 
void AddChronoToList (std::vector< T > &vec_no_ordered, const std::vector< T > &new_vec, const int first_to_skip)
 Insert the new_vec vector at the beginning of a non-chronological vec_no_ordered. More...
 
time_t FirstChronologic (const std::vector< T > &vec_no_ordered) const
 Return dates of the first and last (chronologically) elements. More...
 
time_t LastChronologic (const std::vector< T > &vec_no_ordered) const
 

Detailed Description

template<class T>
class VecNoChronologic< T >

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


This class assumes the data are stored in a non-chronological order

Definition at line 123 of file PolicyChronologic.h.

Member Function Documentation

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

Insert the new_vec vector at the beginning of a non-chronological vec_no_ordered.

Called by ListDataStock::AddToList

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

Definition at line 177 of file PolicyChronologic.h.

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

Return the current chronology policy, of type EPChrono.

Definition at line 128 of file PolicyChronologic.h.

References NO_CHRONO.

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

Policy implementation of ChronologicalAt()

Definition at line 157 of file PolicyChronologic.h.

template<class T >
void VecNoChronologic< T >::Erase_LastChrono ( std::vector< T > &  vec_no_ordered)
inlineprotected

Erase last chronological data, first in vector in this case.

Parameters
vec_no_orderedvector to modify

Definition at line 166 of file PolicyChronologic.h.

template<class T >
time_t VecNoChronologic< T >::FirstChronologic ( const std::vector< T > &  vec_no_ordered) const
inlineprotected

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

Definition at line 187 of file PolicyChronologic.h.

template<class T >
time_t VecNoChronologic< T >::LastChronologic ( const std::vector< T > &  vec_no_ordered) const
inlineprotected

Definition at line 188 of file PolicyChronologic.h.

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

Policy implementation of NoChronologicalAt()

Definition at line 161 of file PolicyChronologic.h.

template<class T >
void VecNoChronologic< 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 141 of file PolicyChronologic.h.

References NO_CHRONO.

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

Return the policy as a string, for printing info.

Definition at line 130 of file PolicyChronologic.h.


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