ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
ListDataStock< T, PolicyChronologic > Class Template Reference

Use a policy PolicyChronologic, default VecNoChronologic. More...

#include <ListDataStock.h>

Inheritance diagram for ListDataStock< T, PolicyChronologic >:
Inheritance graph
[legend]
Collaboration diagram for ListDataStock< T, PolicyChronologic >:
Collaboration graph
[legend]

Public Member Functions

void PrintData (const unsigned int verbose=0) const
 Nice formatting output on console. More...
 
Constructors and destructor
 ListDataStock ()
 
 ListDataStock (std::string iname, ETime itmscl, Utils::firstlast_dates idates=Utils::get_fldate_default())
 
 ListDataStock (std::string iname, ETime itmscl, unsigned int size)
 Reserve size for the vector, default DataStock constructor is called (dates and values are set to zero) More...
 
 ListDataStock (std::string iname, ETime itmscl, const std::vector< T > &vec_data)
 Constructor accepting a std::vector<DataStock> More...
 
 ~ListDataStock ()
 Destructor. More...
 
Wrappers to the internal std::vector
unsigned int GetSize () const
 Return the size of the vector. More...
 
unsigned int Capacity () const
 Return the capacity of the vector. More...
 
void Reserve (const unsigned int new_size)
 Reserve new_size elements. More...
 
void Clear ()
 Clear the vector and reinitialize data members to default values. More...
 
void Swap ()
 Reduce the capacity of the internal vector to fit its size. More...
 
Access to the DataStock elements
const T & ChronologicAt (const unsigned int offset) const
 Get the nth element in a chronological order. More...
 
const T & NoChronologicAt (const unsigned int offset) const
 Get nth element in a non chronological order. More...
 
T & operator[] (const unsigned int offset)
 Access nth element, do not check for the policy chronology. More...
 
Update of the list
void AddData (DataStock &data)
 Add a copy of the DataStock into the ListDataStock. More...
 
int AddToList (const ListDataStockBase *new_list)
 Append all data from a new list ( coming from an Update or ReadCSV normally ) to an existing list. More...
 
void Replace (const ListDataStockBase *ldata_in)
 Replace all DataStock's of the list with ldata_in.data, without checking for update. More...
 
Transform to/from C-Array
unsigned int GetCArray (var_types arraydata_c, const EPChrono b_order, const unsigned int no=0) const
 Extract the data into a one dimensional C-array. More...
 
unsigned int GetCArray (var_types2 arraydata_c, const EPChrono b_order, std::initializer_list< unsigned int > list_no) const
 Overload version with an initilizer_list, fill a 2 dimensional C-array. More...
 
int PutCArray (const ListDataStockBase &ldata_date, const unsigned int nb_data, const unsigned size_indic, var_types arraydata_c, const unsigned int offset_begin, const unsigned int offset_end=0, const EPChrono b_chrono=EPChrono::CHRONO, bool full_array=false)
 Fill a ListDataStock<T> from a 2 dimensional C-array. More...
 
Functions related to the policy of the list
std::string policy () const
 Return a string of the chronology policy. More...
 
EPChrono bpolicy () const
 Return policy as an enumeration type EPChrono, CHRONO / NO_CHRONO. More...
 
time_t LastUpdate () const
 Get the date of the last data (always chronological meaning) More...
 
time_t GetFirstTime () const
 Get the date of the first data (always chronological meaning) More...
 
void Order (const EPChrono b_chronologic=EPChrono::CHRONO)
 Function to reverse the internal vector in its original policy. More...
 
void SetDates ()
 Set the correct first/last dates from the DataStock in the vector. More...
 
void SetDates (time_t first, time_t last)
 Set dates, 2 arguments. More...
 
- Public Member Functions inherited from ListDataStockBase
 ListDataStockBase ()
 Default constructor, set empty names, timescale ETime::not_a_time, dates are zero. More...
 
 ListDataStockBase (std::string iname, ETime itmscl, Utils::firstlast_dates idates=Utils::get_fldate_default())
 Constructor sets name, timescale and optionaly dates. More...
 
virtual ~ListDataStockBase ()
 Destructor. More...
 
std::string GetName () const
 
virtual std::string GetFullName () const
 
virtual ETime GetTimeScale () const
 
virtual void SetTimeScale (const ETime new_tmscl)
 
void SetName (const std::string iname)
 
virtual void SetFullName (std::string fname)
 
virtual Utils::firstlast_dates GetDates () const
 Return the structure Utils::firstlast_dates of the private data member, not from the data. More...
 
time_t GetFirstDate () const
 Get first date from the private data member dates. More...
 
time_t GetLastDate () const
 Get last date from the private data member dates. More...
 
virtual void SetDates (const Utils::firstlast_dates &new_date)
 Set dates with a structure Utils::firstlast_dates. More...
 
virtual void GetVectorData (std::vector< DataCSV > &, const EPChrono) const
 
virtual void GetVectorData (std::vector< SimpleData > &, const EPChrono) const
 
virtual void GetVectorData (std::vector< MultiData > &, const EPChrono) const
 

Protected Member Functions

void GetVectorData (std::vector< T > &res, const EPChrono chrono) const
 

Private Member Functions

 ListDataStock (const ListDataStock &src)=delete
 Deleted copy constructor. More...
 
ListDataStockoperator= (const ListDataStockBase &rhs)=delete
 Deleted assignment operator. More...
 

Private Attributes

std::vector< T > ListData
 internal vector of objects DataStock More...
 

Additional Inherited Members

- Public Types inherited from ListDataStockBase
typedef boost::variant< float
**, double **, int ** > 
var_types
 
typedef boost::variant< float
***, double ***, int *** > 
var_types2
 
- Protected Attributes inherited from ListDataStockBase
std::string name
 name stores the indicator label with the parameters, it corresponds to its ShortName More...
 
ETime tmscl
 TimeScale of the List. More...
 
Utils::firstlast_dates dates
 Store the first and last dates of the list
Redondant with dates from DataStock, added first for reading header of files, selecting a range..
but not easy to keep synchronized and not sure it is really necessary. More...
 
std::string fullname
 fullname seems necessary (convenient) for GUI, never set by constructors More...
 

Detailed Description

template<class T, template< class > class PolicyChronologic>
class ListDataStock< T, PolicyChronologic >

Use a policy PolicyChronologic, default VecNoChronologic.

This class uses ChronologicalAt or NoChronologicalAt() to loop over elements in a specific order,
whatever the order they are stored internally

Most functions to add elements will take care internally the policy is respected (not AddData).

Order() is used to reoder elements in the correct policy. It aims to be called in every specific algorithms, where one of the policy is easier to implement.

Typedefs are defined in typedef.h, to simplify the definition of often used types of list.

Attention
Objects are stored in a std::vector (for expected efficiency), the access to DataStock by references or pointers may cause problems, e.g., if the vector is reallocated.

Definition at line 529 of file ListDataStock.h.

Constructor & Destructor Documentation

template<class T, template< class > class PolicyChronologic>
ListDataStock< T, PolicyChronologic >::ListDataStock ( )
inline

Definition at line 538 of file ListDataStock.h.

template<class T, template< class > class PolicyChronologic>
ListDataStock< T, PolicyChronologic >::ListDataStock ( std::string  iname,
ETime  itmscl,
Utils::firstlast_dates  idates = Utils::get_fldate_default () 
)
inline

Definition at line 540 of file ListDataStock.h.

template<class T, template< class > class PolicyChronologic>
ListDataStock< T, PolicyChronologic >::ListDataStock ( std::string  iname,
ETime  itmscl,
unsigned int  size 
)
inline

Reserve size for the vector, default DataStock constructor is called (dates and values are set to zero)

Definition at line 544 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

template<class T, template< class > class PolicyChronologic>
ListDataStock< T, PolicyChronologic >::ListDataStock ( std::string  iname,
ETime  itmscl,
const std::vector< T > &  vec_data 
)
inline

Constructor accepting a std::vector<DataStock>

Definition at line 547 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

template<class T, template< class > class PolicyChronologic>
ListDataStock< T, PolicyChronologic >::~ListDataStock ( )
inline

Destructor.

Definition at line 554 of file ListDataStock.h.

template<class T, template< class > class PolicyChronologic>
ListDataStock< T, PolicyChronologic >::ListDataStock ( const ListDataStock< T, PolicyChronologic > &  src)
privatedelete

Deleted copy constructor.

Member Function Documentation

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::AddData ( DataStock )
inlinevirtual

Add a copy of the DataStock into the ListDataStock.

The policy is not checked here, always insert to the end of the vector(with a push_back())
Dates are not updated
Correct order can later be changed in calling Order( EPChrono chrono_data )

Todo:

maybe insert first, insert last option, order or chronology ? add order best, but inefficient to insert first every time

should use T in derived class, does not make sense otherwise. More flexible ? certainly can use GetX

Parameters
data: DataStock to insert

Implements ListDataStockBase.

Definition at line 588 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by GetListDataFromPyList(), and ListDataStock_Utils::TransformTimeScale().

Here is the caller graph for this function:

template<class T , template< class > class PolicyChronologic>
int ListDataStock< T, PolicyChronologic >::AddToList ( const ListDataStockBase )
virtual

Append all data from a new list ( coming from an Update or ReadCSV normally ) to an existing list.

Effect expected:

  • FirstDates are equal : replace all data, reset the dates, return 0.
  • First date of new == last date of old : check if need to replace the last data of old
  • Continue for update, adding only the new data, check by assert first date of new > last date of last
Precondition
valid dates for the input new_list.
Postcondition
new_list is not modified, it should always be deleted by the calling function. Dates are correctly updated by this function.
Parameters
new_listlist to append
Returns
status : 0 if correct (even if no update), 1 error: if input is nullptr or its size is 0

Implements ListDataStockBase.

Definition at line 80 of file ListDataStock_timpl.h.

References ListDataStockBase::ChronologicAt(), DataStock::GetDate(), ListDataStockBase::GetFirstDate(), ListDataStockBase::GetFirstTime(), ListDataStockBase::GetLastDate(), ListDataStockBase::GetSize(), ListDataStockBase::GetVectorData(), ListDataStockBase::LastUpdate(), and Utils::Time_tToString().

Here is the call graph for this function:

template<class T, template< class > class PolicyChronologic>
EPChrono ListDataStock< T, PolicyChronologic >::bpolicy ( ) const
inlinevirtual

Return policy as an enumeration type EPChrono, CHRONO / NO_CHRONO.

Implements ListDataStockBase.

Definition at line 624 of file ListDataStock.h.

Referenced by ListDataStock< T, PolicyChronologic >::GetVectorData().

Here is the caller graph for this function:

template<class T, template< class > class PolicyChronologic>
unsigned int ListDataStock< T, PolicyChronologic >::Capacity ( ) const
inlinevirtual

Return the capacity of the vector.

Implements ListDataStockBase.

Definition at line 561 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

template<class T, template< class > class PolicyChronologic>
const T& ListDataStock< T, PolicyChronologic >::ChronologicAt ( const unsigned int  offset) const
inlinevirtual

Get the nth element in a chronological order.

Because the full DataStock object is stored (not a pointer or a base class),
it returns a reference to the exact type (SimpleData, MultiData, DataCSV).

Attention
Do not perform bound-check
It is a reference, it is only valid until the internal vector is not reallocated

ChronologicAt :

  • 0 return the first in time
  • size()-1 return the last in time
Parameters
offsetnth element [0,GetSize()-1]
Returns
a reference to a object derived from DataStock

Implements ListDataStockBase.

Definition at line 570 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by THStock::GetDateFromBin(), ListDataStock< T, PolicyChronologic >::SetDates(), and Stock::WriteCSV().

Here is the caller graph for this function:

template<class T , template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::Clear ( )
virtual

Clear the vector and reinitialize data members to default values.

Call std::vector.clear(), size is set to 0 but capacity is not modified
Reset name and fullname to "" timescale is set to ETime::not_a_time

Implements ListDataStockBase.

Definition at line 25 of file ListDataStock_timpl.h.

References Utils::get_fldate_default(), and not_a_time.

Here is the call graph for this function:

template<class T , template< class > class PolicyChronologic>
unsigned int ListDataStock< T, PolicyChronologic >::GetCArray ( var_types  arraydata_c,
const EPChrono  b_order,
const unsigned int  no = 0 
) const
virtual

Extract the data into a one dimensional C-array.

Extract only the data, as float or double, not the dates.
The C-array is allocated inside the function and filled in the order given by b_order
With type of DataStock containing more than one data, the user can specify which one to extract.

Precondition
the 1D C-array must not be allocated, only declared
Postcondition
The C-array must be deleted (delete []) by the caller after use

Example to create a single dimensional array with the close values:

float * array;
unsigned int size = list_datacsv.GetCArray2 ( &array, EPChrono::NO_CHRONO, 3 );
// need to deallocate later on
delete[] array

Example to create and fill a multi-dimensional array with CLOSE and Volume:

double ** array2 = new double*[nb_indice];
// creates and fill first indice, CLOSE. Give explicitly the address of the first indice of the array
list_datacsv.GetCArray ( &(array2[0]), EPChrono::CHRONO, as_uint(EDS::ECSV::CLOSE) );
// creates and fill second indice, Volume. Give explicitly the address of the second indice of the array
list_volume.GetCArray ( &(array2[1]), EPChrono::CHRONO );
// later on
for ( unsigned int i = 0; i < nb_indice; ++i )
delete[] array2[i];
delete[] array2;

This second example shows that any combination of data could be append into a c-array.
Then this array could be used to fill a ListDataStock<MultiData> for instance

Note
The second example could not be done with the overloaded method accepting a list initializer
(data must come from the same list, and the array cannot be extended later on)
Parameters
arraydata_cpointer on a one dimensional array
b_orderif the data must be in a chronological or not chronological order
noindicates which field to extract. It is possible to use the enumaration EDS::ECSV
Returns
size of the allocated array

Implements ListDataStockBase.

Definition at line 269 of file ListDataStock_timpl.h.

References CHRONO.

template<class T , template< class > class PolicyChronologic>
unsigned int ListDataStock< T, PolicyChronologic >::GetCArray ( var_types2  arraydata_c,
const EPChrono  b_order,
std::initializer_list< unsigned int >  list_no 
) const
virtual

Overload version with an initilizer_list, fill a 2 dimensional C-array.

Allocates and fills a 2-dimensional array

Precondition
the C-array should not be allocated, only defined as float** or double **
Postcondition
the C-array has to be deallocated

Example of usage:

// must be only declared, all allocation inside the function
float **array_out;
// will allocate array_out[ size_allocated ][ nb_data ], here 2
size_allocated = list_csv.GetCArray( &array_out, EPChrono::CHRONO, {as_uint(EDS::ECSV::OPEN), as_uint(EDS::ECSV::CLOSE)} );
//later must deallocate
for ( unsigned int i = 0; i < size_allocated; ++i )
delete[] array_out[i];
delete[] array_out;
Parameters
arraydata_cpointer on a 2 dimensional array
b_orderif the data must be in a chronological or non-chronological order
listof data to extract, e.g., {0,2,3} or {ECSV::OPEN, ECVS::CLOSE}
Returns
first size of the allocated array, can be used for deletion

Implements ListDataStockBase.

Definition at line 311 of file ListDataStock_timpl.h.

template<class T, template< class > class PolicyChronologic>
time_t ListDataStock< T, PolicyChronologic >::GetFirstTime ( ) const
inlinevirtual

Get the date of the first data (always chronological meaning)

Implements ListDataStockBase.

Definition at line 628 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

template<class T, template< class > class PolicyChronologic>
unsigned int ListDataStock< T, PolicyChronologic >::GetSize ( ) const
inlinevirtual

Return the size of the vector.

Returns
the size of the vector, not the capacity

Implements ListDataStockBase.

Definition at line 560 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by ListDataStock< T, PolicyChronologic >::SetDates(), ListDataStock_Utils::TransformTimeScale(), and Stock::UpdateCSVFromWeb().

Here is the caller graph for this function:

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::GetVectorData ( std::vector< T > &  res,
const EPChrono  chrono 
) const
inlineprotected

Definition at line 647 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::bpolicy(), and ListDataStock< T, PolicyChronologic >::ListData.

Here is the call graph for this function:

template<class T, template< class > class PolicyChronologic>
time_t ListDataStock< T, PolicyChronologic >::LastUpdate ( ) const
inlinevirtual

Get the date of the last data (always chronological meaning)

Implements ListDataStockBase.

Definition at line 626 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

template<class T, template< class > class PolicyChronologic>
const T& ListDataStock< T, PolicyChronologic >::NoChronologicAt ( const unsigned int  offset) const
inlinevirtual

Get nth element in a non chronological order.

Because the full DataStock object is stored (not a pointer or a base class),
it returns a reference to the exact type (SimpleData, MultiData, DataCSV).

Attention
Do not perform bound-check
It is a reference, it is only valid until the internal vector is not reallocated
Parameters
offsetnth element [0,GetSize()-1]
Returns
a reference to a object derived from DataStock

Implements ListDataStockBase.

Definition at line 573 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by ListDataStock< T, PolicyChronologic >::SetDates(), ListDataStock_Utils::TransformTimeScale(), and Stock::WriteCSV().

Here is the caller graph for this function:

template<class T, template< class > class PolicyChronologic>
ListDataStock& ListDataStock< T, PolicyChronologic >::operator= ( const ListDataStockBase rhs)
privatedelete

Deleted assignment operator.

template<class T, template< class > class PolicyChronologic>
T& ListDataStock< T, PolicyChronologic >::operator[] ( const unsigned int  offset)
inlinevirtual

Access nth element, do not check for the policy chronology.

Implements ListDataStockBase.

Definition at line 578 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::Order ( const EPChrono  chrono = EPChrono::CHRONO)
inlinevirtual

Function to reverse the internal vector in its original policy.

Need to know the order the data have been added (order_data) using AddData (AddToList should be correct now) Then the call to Order( order_data ), will modify the internal vector order to respect the policy of the list.
If the order is already correct, nothing will be done (known at compile-time).
It allows to use any convenient order in a specific algorithm, and correct only at the end.
Even if the list is created outside the function which implements the algorithm.

Default true from TAlib, indicates if order is chronologic or not

Parameters
b_chronologic, indicates if the data have been inserted chronologicaly or not

Implements ListDataStockBase.

Definition at line 629 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by ListDataStock_Utils::TransformTimeScale(), Stock::UpdateCSVFromWeb(), and wrapUpdateCSV().

Here is the caller graph for this function:

template<class T, template< class > class PolicyChronologic>
std::string ListDataStock< T, PolicyChronologic >::policy ( ) const
inlinevirtual

Return a string of the chronology policy.

Implements ListDataStockBase.

Definition at line 623 of file ListDataStock.h.

template<class T , template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::PrintData ( const unsigned int  verbose = 0) const
virtual

Nice formatting output on console.

verbose :

  • 0 Print first and last data, with header
  • 1 Print all data, no header
Parameters
verbose: add more information, value = 0 (default) or 1

Implements ListDataStockBase.

Definition at line 469 of file ListDataStock_timpl.h.

References FullName::GetTimeScale(), and Utils::Time_tToString().

Referenced by wrapUpdateCSV().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , template< class > class PolicyChronologic>
int ListDataStock< T, PolicyChronologic >::PutCArray ( const ListDataStockBase ldata_date,
const unsigned int  nb_data,
const unsigned  size_indic,
var_types  arraydata_c,
const unsigned int  offset_begin,
const unsigned int  offset_end = 0,
const EPChrono  b_chrono = EPChrono::CHRONO,
bool  full_array = false 
)
virtual

Fill a ListDataStock<T> from a 2 dimensional C-array.

Insert all the data of the C-array into the list.
If the indicator has multiple values (MACD), all data are inserted at once with a ListDataStock<MultiData>.
The ldata_date parameter is necessary to set the dates after a computation,
Normally, it is the same List used as input for the computation (allow correct offsets)
Because some indicators may be shorter than the input, e.g. a moving average of X data, TALib uses the concept of offsets.
When putting the data into a List, it should be specified a offset_begin of X.

The algorithm is independent of the policy order of ldata_date or this.
The only important parameter is the order of the c-array: last parameter b_chrono.

Precondition
c-array, a pointer to a 2 dimensional array ?? should work with one dimensional (size_indic 1) ?
For length of c-array nb_data_c must be correct: larger or equal than nb_data == ldata_date - offset_begin - offset_end, (assert, maybe nb_data < later)
For width of c_array size_indic should be valid (c_array at least large enough)
Postcondition
Size of the output is nb_data == ldata_date.size()- offset_begin- offset_end (assert, may be relaxed)
Dates as data members are updated
TimeScale of the output is set according to ldata_date (warning if wrong in input)
Name is left unchanged

Maybe later, a shift for size_indic: extract only relevant columns

Parameters
ldata_datea list which will be used to set the correct dates
nb_datathe number of time data to include, should be smaller or equal to the nb_data_c
size_indicnumber of values for each data, e.g. for MACD = 3
arraydata_cc-array[size_indic][nb_data_c] as input with nb_data_c == nb_data at the moment
offset_beginoffset with the beginning of ldata_date (considered chronological)
offset_endoffset with the end of ldata_date (consider chronological)
b_chronoEPChrono enumeration, indicates in which order the data are stored in the C-array
full_arrayboolean true : a full c-array is used, or false : offset(s) are not present
Returns
status not used yet

Implements ListDataStockBase.

Definition at line 375 of file ListDataStock_timpl.h.

References CHRONO, ListDataStockBase::ChronologicAt(), DataStock::GetDate(), ListDataStockBase::GetSize(), ListDataStockBase::GetTimeScale(), NO_CHRONO, ListDataStockBase::NoChronologicAt(), and not_a_time.

Here is the call graph for this function:

template<class T , template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::Replace ( const ListDataStockBase )
virtual

Replace all DataStock's of the list with ldata_in.data, without checking for update.

Copy explicitly the data of new_list into this and set the new dates.
=> Pointers to this are still valid.
Insert data respecting the policy of this.
Used by TAlib indicators, always replace the listdata by default

Postcondition
new_list should always be deleted after a replace
Dates in data members are correctly updated

to see later, avoid this expensive copy, try more real update

Parameters
ldata_inlist with new DataStock

Implements ListDataStockBase.

Definition at line 205 of file ListDataStock_timpl.h.

References ListDataStockBase::GetVectorData().

Here is the call graph for this function:

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::Reserve ( const unsigned int  new_size)
inlinevirtual

Reserve new_size elements.

Allocate enough memory to store new_size objects without reallocating memory

Parameters
new_sizeof the vector

Implements ListDataStockBase.

Definition at line 562 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by GetListDataFromPyList(), and ListDataStock_Utils::TransformTimeScale().

Here is the caller graph for this function:

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::SetDates ( )
inlinevirtual

Set the correct first/last dates from the DataStock in the vector.

to call only after loading the data

Implements ListDataStockBase.

Definition at line 633 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ChronologicAt(), ListDataStockBase::dates, Utils::firstlast_dates::first, ListDataStock< T, PolicyChronologic >::GetSize(), Utils::firstlast_dates::last, and ListDataStock< T, PolicyChronologic >::NoChronologicAt().

Referenced by ListDataStock_Utils::TransformTimeScale(), Stock::UpdateCSVFromWeb(), and wrapUpdateCSV().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::SetDates ( time_t  first,
time_t  last 
)
inlinevirtual

Set dates, 2 arguments.

Reimplemented from ListDataStockBase.

Definition at line 640 of file ListDataStock.h.

References ListDataStockBase::SetDates().

Here is the call graph for this function:

template<class T, template< class > class PolicyChronologic>
void ListDataStock< T, PolicyChronologic >::Swap ( )
inlinevirtual

Reduce the capacity of the internal vector to fit its size.

Implements ListDataStockBase.

Definition at line 564 of file ListDataStock.h.

References ListDataStock< T, PolicyChronologic >::ListData.

Referenced by ListDataStock_Utils::TransformTimeScale().

Here is the caller graph for this function:

Field Documentation

template<class T, template< class > class PolicyChronologic>
std::vector<T> ListDataStock< T, PolicyChronologic >::ListData
private

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