ROOT_Application
2.0
C++ Core modules and GUIStock
|
Controller for a dual frame containing Indicator+THStock(s). More...
#include <MainControllerIndicatorTHStock.h>
Public Member Functions | |
MainControllerIndicatorTHStock (GUIMainController *parent_control, std::string name, TGCompositeFrame *associated_frame, bool b_mainframe) | |
Constructor. More... | |
virtual | ~MainControllerIndicatorTHStock () |
MainIndicatorTHStockFrame * | GetFrame () const |
GUIMainController * | GetGUIMainController () const |
ControllerIndicatorTHStock * | GetCurrentController () const |
StockManager * | GetStockManager () const |
void | AddCouple_Indicator_THStock (std::string frame_name) |
Create a new sub-controller and update views for adding a new frame Does not add any data, done later by AddData. More... | |
void | DeleteIndicatorTHstock () |
Delete all couples of frames and thstocks Call by MainControllerIndicatorStock::CloseWindow() More... | |
void | Validation (std::string fullname) |
Load stock or indicator after pressing the Validation button. More... | |
virtual void | Updated (std::vector< std::string > &message) |
Call by parent controller, when a new message is available. More... | |
void | GetSelected (ControllerIndicatorTHStock *child_controller) |
receive indirectly the IndicatorFrame Selected, can set the current_frame ( can get pad also ) More... | |
void | UpdateIndicator (ControllerIndicatorTHStock *child_controller, std::string mode) |
called by controller child for some tasks child cannot do. More... | |
void | Update () |
coming from StockManager, through observer pattern no should come from gui_maincontroller now More... | |
Public Member Functions inherited from ControllerFrame< ControllerIndicatorTHStock > | |
ControllerFrame () | |
ControllerFrame (ControllerBase *parent, std::string name="") | |
virtual | ~ControllerFrame () |
Public Member Functions inherited from ControllerBase | |
ControllerBase () | |
ControllerBase (ControllerBase *parent, std::string cont_name) | |
virtual | ~ControllerBase () |
std::string | GetName () const |
ControllerBase * | GetParentController () |
Public Member Functions inherited from ListController< ControllerIndicatorTHStock > | |
ListController () | |
virtual | ~ListController () |
void | AddController (ControllerIndicatorTHStock *control) |
Common Function for dealing with the list, need a name, may call other controllers... More... | |
void | RemoveController (ControllerIndicatorTHStock *control) |
ControllerIndicatorTHStock * | GetController (std::string name) |
ControllerIndicatorTHStock * | GetFirstController () |
get the first controller in list, useful after a delete More... | |
virtual void | DeleteList (bool call_delete=true) |
Iterative call for deleting child controller. More... | |
virtual unsigned int | GetSizeListController () const |
Private Attributes | |
MainIndicatorTHStockFrame * | findic_thstock |
ControllerIndicatorTHStock * | fcurrent_controller |
GUIMainController * | myparent_controller |
bool | kMainFrame |
link to StockManager, singleton, initialized in constructor More... | |
Additional Inherited Members | |
Protected Types inherited from ListController< ControllerIndicatorTHStock > | |
typedef std::list < ControllerIndicatorTHStock * > ::iterator | it_list |
useful typedef for the class ( and derivatives !) More... | |
Protected Attributes inherited from ListController< ControllerIndicatorTHStock > | |
std::list < ControllerIndicatorTHStock * > | list_controller |
list more convenient, remove if not shown ?, or insert More... | |
Controller for a dual frame containing Indicator+THStock(s).
Should be flexible and allow only THStock ( not real interest at the moment ) Own EventInfo and status as common for all THStocks
Contains a list of sub-controller ControllerIndicatorTHStock for dealing with synchronization: 1 Indicator + 1 THStock
Definition at line 37 of file MainControllerIndicatorTHStock.h.
MainControllerIndicatorTHStock::MainControllerIndicatorTHStock | ( | GUIMainController * | parent_control, |
std::string | name, | ||
TGCompositeFrame * | associated_frame, | ||
bool | b_mainframe | ||
) |
Constructor.
parent_control | : parent_controller |
name | : name of the controller |
associated_frame | : needed the parent frame |
Definition at line 30 of file MainControllerIndicatorTHStock.cxx.
References fcurrent_controller, findic_thstock, ControllerBase::GetName(), kMainFrame, and myparent_controller.
|
virtual |
Definition at line 91 of file MainControllerIndicatorTHStock.cxx.
References ListController< ControllerIndicatorTHStock >::DeleteList().
void MainControllerIndicatorTHStock::AddCouple_Indicator_THStock | ( | std::string | frame_name | ) |
Create a new sub-controller and update views for adding a new frame Does not add any data, done later by AddData.
frame_name | : name of the new frame |
Definition at line 113 of file MainControllerIndicatorTHStock.cxx.
References ListController< ControllerIndicatorTHStock >::AddController(), fcurrent_controller, findic_thstock, GetFrame(), ControllerIndicatorTHStock::GetIndicatorFrame(), MainIndicatorTHStockFrame::GetIndicatorFrame(), ControllerIndicatorTHStock::GetTHStockFrame(), and MainIndicatorTHStockFrame::GetTHStockFrame().
Referenced by Validation().
void MainControllerIndicatorTHStock::DeleteIndicatorTHstock | ( | ) |
Delete all couples of frames and thstocks Call by MainControllerIndicatorStock::CloseWindow()
Definition at line 171 of file MainControllerIndicatorTHStock.cxx.
References GUIMainController::DeleteControllerIndicatorTHStock(), and GetGUIMainController().
Referenced by MainIndicatorTHStockFrame::CloseWindow().
|
inline |
Definition at line 84 of file MainControllerIndicatorTHStock.h.
References fcurrent_controller.
Referenced by Validation().
|
inline |
Definition at line 78 of file MainControllerIndicatorTHStock.h.
References findic_thstock.
Referenced by AddCouple_Indicator_THStock(), ControllerIndicatorTHStock::ControllerIndicatorTHStock(), and Validation().
|
inline |
Definition at line 79 of file MainControllerIndicatorTHStock.h.
References myparent_controller.
Referenced by DeleteIndicatorTHstock().
void MainControllerIndicatorTHStock::GetSelected | ( | ControllerIndicatorTHStock * | child_controller | ) |
receive indirectly the IndicatorFrame Selected, can set the current_frame ( can get pad also )
Definition at line 488 of file MainControllerIndicatorTHStock.cxx.
References fcurrent_controller, findic_thstock, ControllerBase::GetName(), FullName::GetNameStock(), FullName::GetTimeScale(), MainIndicatorTHStockFrame::SetTextResearch(), and MainIndicatorTHStockFrame::SetTimeScale().
StockManager * MainControllerIndicatorTHStock::GetStockManager | ( | ) | const |
Definition at line 104 of file MainControllerIndicatorTHStock.cxx.
References GUIMainController::GetStockManager(), and myparent_controller.
Referenced by ControllerIndicatorTHStock::UpdateIndicator(), and Validation().
void MainControllerIndicatorTHStock::Update | ( | ) |
coming from StockManager, through observer pattern no should come from gui_maincontroller now
Definition at line 571 of file MainControllerIndicatorTHStock.cxx.
References fcurrent_controller, and ControllerIndicatorTHStock::UpdateFrames().
|
virtual |
Call by parent controller, when a new message is available.
overload a pure virtual function
Implements ControllerBase.
Definition at line 465 of file MainControllerIndicatorTHStock.cxx.
References ListController< ControllerIndicatorTHStock >::list_controller.
void MainControllerIndicatorTHStock::UpdateIndicator | ( | ControllerIndicatorTHStock * | child_controller, |
std::string | mode | ||
) |
called by controller child for some tasks child cannot do.
synchronisation Indicator/THStockFrame
Definition at line 510 of file MainControllerIndicatorTHStock.cxx.
References fcurrent_controller, findic_thstock, ListController< ControllerIndicatorTHStock >::GetFirstController(), ControllerIndicatorTHStock::GetIndicatorFrame(), MainIndicatorTHStockFrame::GetIndicatorFrame(), ControllerBase::GetName(), ListController< ControllerIndicatorTHStock >::GetSizeListController(), ControllerIndicatorTHStock::GetTHStockFrame(), MainIndicatorTHStockFrame::GetTHStockFrame(), myparent_controller, ListController< ControllerIndicatorTHStock >::RemoveController(), ControllerIndicatorTHStock::SetIndicatorFrame(), ControllerIndicatorTHStock::SetTHStockFrame(), and GUIMainController::UpdateGUIFromController().
Referenced by ControllerIndicatorTHStock::UpdateIndicator().
void MainControllerIndicatorTHStock::Validation | ( | std::string | fullname | ) |
Load stock or indicator after pressing the Validation button.
need access to fstockmanager, should be in GUIMainController only ?? or retrieve from global need to call GUIMainController anyway, if need to create a independent MainControlletIndactorTHStock
fullname | : string containing all infos |
BUG here ////////////////////// AddStock Dangerous, no check if existed, now exception working AddStock should make all the job, independent before if newStock or not... more reusable Done with StockManager::Merge called by AddStock do not throw exception
Definition at line 196 of file MainControllerIndicatorTHStock.cxx.
References AddCouple_Indicator_THStock(), ControllerIndicatorTHStock::AddData(), StockManager::AddStock(), GUIMainController::CreateMainControllerIndicatorTHStock(), DAY, fcurrent_controller, StockManager::Find(), findic_thstock, Utils::firstlast_dates::first, Utils::get_fldate_default(), GetCurrentController(), GetFrame(), FullName::GetIndicator(), FullName::GetNameStock(), FullName::GetParams(), Utils::GetPathData(), GetStockManager(), FullName::GetTimeScale(), INST, Utils::firstlast_dates::last, StockManager::Load(), FrameName::MakeFrameName(), myparent_controller, StockManager::PrintMap(), Stock::PrintMapChrono(), Stock::Read_HeaderCSV(), MainIndicatorTHStockFrame::ResetEntries(), Indicator::StockCSV, Indicator::StockInst, MainIndicatorTHStockFrame::ToAddCanvas(), MainIndicatorTHStockFrame::ToMakeMain(), GUIMainController::UpdateGUIFromController(), and StockException::what().
Referenced by MainIndicatorTHStockFrame::HandleButtons().
|
private |
Definition at line 45 of file MainControllerIndicatorTHStock.h.
Referenced by AddCouple_Indicator_THStock(), GetCurrentController(), GetSelected(), MainControllerIndicatorTHStock(), Update(), UpdateIndicator(), and Validation().
|
private |
Definition at line 41 of file MainControllerIndicatorTHStock.h.
Referenced by AddCouple_Indicator_THStock(), GetFrame(), GetSelected(), MainControllerIndicatorTHStock(), UpdateIndicator(), and Validation().
|
private |
link to StockManager, singleton, initialized in constructor
indicates if it is a MainFrame (independent frame) or not
Definition at line 56 of file MainControllerIndicatorTHStock.h.
Referenced by MainControllerIndicatorTHStock().
|
private |
Definition at line 49 of file MainControllerIndicatorTHStock.h.
Referenced by GetGUIMainController(), GetStockManager(), MainControllerIndicatorTHStock(), UpdateIndicator(), and Validation().