|
ROOT_Application
2.0
C++ Core modules and GUIStock
|
Derive class which contains only one value of type type_value_data (float or double). More...
#include <DataStock.h>


Public Member Functions | |
| SimpleData () | |
| Default constructor, set value to 0. More... | |
| SimpleData (type_value_data ivalue) | |
| Initialize the value, date at 0. More... | |
| SimpleData (time_t d, type_value_data ivalue) | |
| Initialize date and value. More... | |
| SimpleData (unsigned int) | |
| Constructor with integer, no effect here but need for MultiData and ListDatStock template. More... | |
| SimpleData (const SimpleData &rhs) | |
| Copy constructor. More... | |
| SimpleData (SimpleData &&rhs) | |
| Move copy constructor. More... | |
| virtual | ~SimpleData () |
| Destructor. More... | |
Assignment operators | |
| SimpleData & | operator= (const SimpleData &rhs) |
| Normal assignment. More... | |
| SimpleData & | operator= (SimpleData &&rhs) |
| Move assignment. More... | |
Implementation of pure virtual functions for SimpleData | |
| virtual void | SetData (const time_t d, const std::vector< type_value_data > &vec) |
| Set a full Data : date + value(s) in a vector. More... | |
| virtual std::vector < type_value_data > | GetValues () const |
| Return the value(s) in a vector. More... | |
| virtual void | SetValues (std::vector< type_value_data > &vec) |
| Set only values, do not modify the date. More... | |
| virtual type_value_data | GetMaximum () const |
| Get the maximum value, only one value in this class. More... | |
| virtual type_value_data | GetMinimum () const |
| Get the minimum value, only one value in this class. More... | |
| virtual bool | HasChanged (const DataStock &data_to_check) const |
| Check if data are different. More... | |
| virtual void | ExtractCSVLine (std::vector< std::string > &linecsv) |
| Extract the data from a splitted string. More... | |
| void | PrintData (const unsigned int verbose=0) const |
| User friendly output on screen. More... | |
Specific functions of SimpleData | |
| type_value_data | GetValue () const |
| Get the unique value. More... | |
| void | SetValue (const type_value_data ivalue) |
| Set the unique value. More... | |
| void | SetData (const time_t d, const type_value_data ivalue) |
| Set the date and value. More... | |
Public Member Functions inherited from DataStock | |
| DataStock () | |
| Default constructor set date to 0. More... | |
| DataStock (time_t d) | |
| Set the date, used in initialization of derived classes. More... | |
| DataStock (const DataStock &rhs) | |
| Copy constructor. More... | |
| DataStock (DataStock &&rhs) | |
| Move copy constructor. More... | |
| virtual | ~DataStock () |
| Destructor. More... | |
| DataStock & | operator= (const DataStock &rhs) |
| Normal assignment. More... | |
| DataStock & | operator= (DataStock &&rhs) |
| Move assignment. More... | |
| time_t | GetDate () const |
| Get the date data member. More... | |
| void | SetDate (const time_t d) |
| Modify the date. More... | |
| std::string | GetDateString (const bool bhours=true) const |
| Return the date in a string format: "YEAR-MOnth-DAy HH:MM:SS" (2014-11-10 13::25::00) More... | |
| struct tm | GetDateTm () const |
| Get a tm structure of the date. More... | |
Protected Member Functions | |
Specific to input/output of SimpleData | |
| virtual void | helper_operator_write (std::ostream &os) const |
| virtual void | helper_operator_read (std::iostream &ios) |
Protected Member Functions inherited from DataStock | |
| int | helper_operator_read_base (std::iostream &ios) |
| Helper function for operator<< for reading date from input streams. More... | |
| void | helper_operator_write_base (std::ostream &os) const |
| Helper function for operator>> for writing date to output. More... | |
Private Attributes | |
| type_value_data | value |
Friends | |
| bool | operator== (const SimpleData &lhs, const SimpleData &rhs) |
| Compare date and value. More... | |
Additional Inherited Members | |
Protected Attributes inherited from DataStock | |
| time_t | date |
| All data have a date associated. More... | |
Derive class which contains only one value of type type_value_data (float or double).
Used For Instantaneous value, Volume, SMA, EMA...
Definition at line 335 of file DataStock.h.
| SimpleData::SimpleData | ( | ) |
Default constructor, set value to 0.
Definition at line 225 of file DataStock.cpp.
| SimpleData::SimpleData | ( | type_value_data | ivalue | ) |
Initialize the value, date at 0.
Definition at line 231 of file DataStock.cpp.
| SimpleData::SimpleData | ( | time_t | d, |
| type_value_data | ivalue | ||
| ) |
Initialize date and value.
Definition at line 237 of file DataStock.cpp.
| SimpleData::SimpleData | ( | unsigned | int | ) |
Constructor with integer, no effect here but need for MultiData and ListDatStock template.
Definition at line 243 of file DataStock.cpp.
| SimpleData::SimpleData | ( | const SimpleData & | rhs | ) |
| SimpleData::SimpleData | ( | SimpleData && | rhs | ) |
|
inlinevirtual |
Destructor.
Definition at line 354 of file DataStock.h.
|
virtual |
Extract the data from a splitted string.
Format expected : "Date","float"
| linecsv | line already split in a vector |
Implements DataStock.
Definition at line 320 of file DataStock.cpp.
References DataStock::SetDate(), SetValue(), and Utils::StringToTime_t().

|
inlinevirtual |
Get the maximum value, only one value in this class.
Implements DataStock.
Definition at line 375 of file DataStock.h.
References value.
|
inlinevirtual |
Get the minimum value, only one value in this class.
Implements DataStock.
Definition at line 377 of file DataStock.h.
References value.
|
inline |
Get the unique value.
Definition at line 391 of file DataStock.h.
References value.
Referenced by DataCSV::AdditionData(), HasChanged(), helper_operator_write(), and ListDataStock_Utils::TransformTimeScale().

|
virtual |
Return the value(s) in a vector.
Implements DataStock.
Definition at line 306 of file DataStock.cpp.
References value.
|
virtual |
Check if data are different.
To compare all fields use operator==
Exact implementation is different for each derived class:
Implements DataStock.
Definition at line 327 of file DataStock.cpp.
References DataStock::GetDate(), DataStock::GetDateString(), and GetValue().

| SimpleData & SimpleData::operator= | ( | const SimpleData & | rhs | ) |
Normal assignment.
Definition at line 271 of file DataStock.cpp.
References DataStock::operator=(), and value.

| SimpleData & SimpleData::operator= | ( | SimpleData && | rhs | ) |
Move assignment.
Definition at line 288 of file DataStock.cpp.
References DataStock::operator=(), and value.

|
virtual |
User friendly output on screen.
verbose level:
1 : add a header before the line
| verbose | level of output |
Implements DataStock.
Definition at line 363 of file DataStock.cpp.
References FDS::WCOL.
Referenced by StockManager::SendDatadCSV().

|
inlinevirtual |
Set a full Data : date + value(s) in a vector.
Implements DataStock.
Definition at line 366 of file DataStock.h.
References DataStock::date, and value.
Referenced by GetListDataFromPyList(), Stock::ReadCSV(), StockManager::SendDatadCSV(), wrap_SaveInst(), and wrap_UpdateCSV().

|
inline |
Set the date and value.
Definition at line 395 of file DataStock.h.
References DataStock::date, and value.
|
inline |
Set the unique value.
Definition at line 393 of file DataStock.h.
References value.
Referenced by ExtractCSVLine(), and helper_operator_read().

|
virtual |
Set only values, do not modify the date.
Implements DataStock.
Definition at line 313 of file DataStock.cpp.
References value.
|
friend |
Compare date and value.
Definition at line 910 of file DataStock.cpp.
|
private |
Definition at line 338 of file DataStock.h.
Referenced by GetMaximum(), GetMinimum(), GetValue(), GetValues(), operator=(), operator==(), SetData(), SetValue(), SetValues(), and SimpleData().
1.8.6