17 #ifndef _CONTROLLERINDICATORTHSTOCK_H_
18 #define _CONTROLLERINDICATORTHSTOCK_H_
23 #include "../../utils/Indicator.h"
26 #include "../../utils/TimeScale.h"
32 class TGCompositeFrame;
52 typedef std::list<std::string>::iterator
it_list;
53 typedef std::list<std::string>::const_iterator
it_clist;
54 typedef std::vector< std::list<std::string> >::iterator
it_vec;
55 typedef std::vector< std::list<std::string> >::const_iterator
it_cvec;
78 bool IsPresent( std::string fullname,
unsigned int i )
const;
80 std::list<std::string> *
GetList(
unsigned int nb_pad );
98 TGCompositeFrame *mother_frame_thstock, std::string frame_name );
109 void AddData( std::string fullname );
134 virtual void Updated( std::vector<std::string> & message );
virtual ~ControllerIndicatorTHStock()
IndicatorFrame * findic_frame
pointer to the frame and indicator.
void GetSelected(int pad_number)
void ModifyColorIndic(std::string fullname, unsigned long color)
void UpdateIndicator(std::string mode, std::string fullname)
UpdateIndicator, call by IndicatorFrame.
Controller for a dual frame containing Indicator+THStock(s).
bool NeedToUpdate(std::string stockname, ETime tmscl) const
check if the size of ldata and object match, or if need an update.
std::list< std::string > * GetList(unsigned int nb_pad)
return the list of name of the pad number nb_pad.
std::list< std::string >::iterator it_list
define iterator and const iterator for loop
Final controller class, does not derive from ListController.
ControllerIndicatorTHStock(MainControllerIndicatorTHStock *parent, TGCompositeFrame *mother_frame_indic, TGCompositeFrame *mother_frame_thstock, std::string frame_name)
int AddDataToVecNameData(std::string fullname, unsigned int nb_pad=0)
add the name of the new data in the pad nb_pad.
std::vector< std::list< std::string > >::iterator it_vec
void SetTHStockFrame(THStockFrame *fthstock)
void SetIndicatorFrame(IndicatorFrame *findic)
Contains an EmbeddedCanvas and a CanvasStock.
ETime
Enumeration for the different time representation, from instantaneous (INST) to year(YEAR) ...
std::vector< std::list< std::string > > vec_name_data
add a list of loaded data, use only name ( fullname ).
MainControllerIndicatorTHStock * myparent_controller
before base was working, test if explicit, seems necessary depending on the function called ...
void AddData(std::string fullname)
Used when a new ListData is added, need SM access here, or in parent...
Show all data loaded in memory, allow to deal with Button.
Base class for controllers of the graphical application.
unsigned int GetPadNumber(std::string fullname) const
want the index of the vector containing the corresponding fullname, i.e.
std::list< std::string >::const_iterator it_clist
bool IsPresent(std::string fullname, unsigned int i) const
check if fullname is present in the pad number i
void UpdateFrames()
keep only for updating THStockFrame for the moment, how done by Indicator ?
std::vector< std::list< std::string > >::const_iterator it_cvec
virtual void Updated(std::vector< std::string > &message)
receive an update from observer pattern, from StockManager
see remark below, much easier if composition than derivation in the case of ListController, same for parent_controller as member <U> easily extends to View as well ( ListView possible ), but strong coupling again
void PrintVector()
Print the Content of the vector vec_name_data, for debugging.
THStockFrame * GetTHStockFrame() const
IndicatorFrame * GetIndicatorFrame() const
THStockFrame * fthstock_frame
pointer to the frame