ROOT_Application
2.0
C++ Core modules and GUIStock
|
Factory for all object stock. More...
#include <FactoryObjectStock.h>
Data Structures | |
class | cxx |
Implementation file. More... | |
Public Types | |
enum | EStageDraw { kBeginDraw =0, kMoveDraw =1, kEndDraw =2 } |
define stages for drawing More... | |
Static Public Member Functions | |
static IndicatorObjectStock * | CreateObjectStock (Indicator indic, std::string full_name_indic, unsigned int size, THStock *parent, std::string opt_string=std::string()) |
create indicator object More... | |
static ObjectLine * | CreateDrawableObjectLine (int stage_draw, double valueX, double valueY, TypeLine mode_obj) |
create specifically ObjectLine More... | |
static EColor | MakeColor (const char str_color) |
translate name to integer color in root More... | |
Protected Member Functions | |
FactoryObjectStock () | |
virtual | ~FactoryObjectStock () |
Static Protected Attributes | |
static ObjectLine * | obj = nullptr |
no direct access to internal ObjectLine More... | |
Factory for all object stock.
First attempt made class with static method, may evolve Combine with EditorObjectStock ?
Seperate methods CreateObjectStock ( for indicator ) and CreateObjectLine ( for simple and drawable line )
Definition at line 35 of file FactoryObjectStock.h.
define stages for drawing
Enumerator | |
---|---|
kBeginDraw | |
kMoveDraw | |
kEndDraw |
Definition at line 47 of file FactoryObjectStock.h.
|
inlineprotected |
Definition at line 42 of file FactoryObjectStock.h.
|
inlineprotectedvirtual |
Definition at line 43 of file FactoryObjectStock.h.
|
static |
create specifically ObjectLine
Static method to create DrawableObjectLine.
2 choices : here create the line object or call static function in subclasses, better for extending, but add other static functions... not bad if all static in Factory ObjectLine * FactoryObjectStock::CreateDrawableObjectLine( int stage_draw, int px, int py, int mode_obj ) get data in absolute value, transformation done in TPadStock
Definition at line 224 of file FactoryObjectStock.cxx.
References ObjectLine::GetTypeLine(), ObjectLine::GetX0(), ObjectLine::GetX1(), ObjectLine::GetY0(), ObjectLine::GetY1(), kBeginDraw, kEndDraw, kMoveDraw, kSupport, kTendance, obj, ObjectLine::SetLineColor(), ObjectLine::SetX1(), and ObjectLine::SetY1().
Referenced by TPadStock::ExecuteEvent().
|
static |
create indicator object
Static class only entry to create object, call all derived functions and delegeguate construction.
Create only IndicatorObjectStock, all Indicator and lines for support to indicator
indic | |
full_name_indic | |
size | |
parent | |
opt_string |
Definition at line 38 of file FactoryObjectStock.cxx.
References THStock::Add(), Indicator::GetDescription(), Indicator::label(), Indicator::MakeEColor(), Indicator::parse_description(), Indicator::RSI, ObjectLine::SetLineColor(), and AbstractObjectStock::SetParent().
Referenced by THStock::AddPairToVector().
|
static |
translate name to integer color in root
Definition at line 380 of file FactoryObjectStock.cxx.
Referenced by ControllerIndicatorTHStock::AddData().
|
staticprotected |
no direct access to internal ObjectLine
Definition at line 39 of file FactoryObjectStock.h.
Referenced by CreateDrawableObjectLine().