ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Public Types | Static Public Member Functions | Protected Member Functions | Static Protected Attributes
FactoryObjectStock Class Reference

Factory for all object stock. More...

#include <FactoryObjectStock.h>

Collaboration diagram for FactoryObjectStock:
Collaboration graph
[legend]

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 IndicatorObjectStockCreateObjectStock (Indicator indic, std::string full_name_indic, unsigned int size, THStock *parent, std::string opt_string=std::string())
 create indicator object More...
 
static ObjectLineCreateDrawableObjectLine (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 ObjectLineobj = nullptr
 no direct access to internal ObjectLine More...
 

Detailed Description

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.

Member Enumeration Documentation

define stages for drawing

Enumerator
kBeginDraw 
kMoveDraw 
kEndDraw 

Definition at line 47 of file FactoryObjectStock.h.

Constructor & Destructor Documentation

FactoryObjectStock::FactoryObjectStock ( )
inlineprotected

Definition at line 42 of file FactoryObjectStock.h.

virtual FactoryObjectStock::~FactoryObjectStock ( )
inlineprotectedvirtual

Definition at line 43 of file FactoryObjectStock.h.

Member Function Documentation

ObjectLine * FactoryObjectStock::CreateDrawableObjectLine ( int  stage_draw,
double  valueX,
double  valueY,
TypeLine  mode_obj 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

IndicatorObjectStock * FactoryObjectStock::CreateObjectStock ( Indicator  indic,
std::string  full_name_indic,
unsigned int  size,
THStock parent,
std::string  opt_string = std::string() 
)
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

Parameters
indic
full_name_indic
size
parent
opt_string
Returns

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().

Here is the call graph for this function:

Here is the caller graph for this function:

EColor FactoryObjectStock::MakeColor ( const char  str_color)
static

translate name to integer color in root

Definition at line 380 of file FactoryObjectStock.cxx.

Referenced by ControllerIndicatorTHStock::AddData().

Here is the caller graph for this function:

Field Documentation

ObjectLine * FactoryObjectStock::obj = nullptr
staticprotected

no direct access to internal ObjectLine

Definition at line 39 of file FactoryObjectStock.h.

Referenced by CreateDrawableObjectLine().


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