ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FactoryObjectStock.h
Go to the documentation of this file.
1 
10 #ifndef _FACTORY_OBJECTSTOCK_H_
11 #define _FACTORY_OBJECTSTOCK_H_
12 
13 // import used by THStock
14 #include "ObjectStock.h"
15 #include "ObjectLine.h"
16 
17 #include "../../utils/Indicator.h"
18 //class ObjectLine;
19 // only used from ObjectStock
20 //class IndicatorObjectStock;
21 
22 
23 //could use a namespace, see discussion: http://stackoverflow.com/questions/9321/how-do-you-create-a-static-class-in-c
24 //seems better, namespace as well ? like for EditorObjectStock ?
25 
36 
37  protected :
39  static ObjectLine *obj;
40 
41  // override constructor and destructor, make protected
43  virtual ~FactoryObjectStock() {};
44 
45  public :
48 
50  static IndicatorObjectStock* CreateObjectStock( Indicator indic, std::string full_name_indic, unsigned int size, THStock * parent,
51  std::string opt_string = std::string() );
52 
54  static ObjectLine * CreateDrawableObjectLine( int stage_draw, double valueX, double valueY, TypeLine mode_obj );
55 
57  static EColor MakeColor( const char str_color);
58 };
59 
60 #endif //_FACTORY_OBJECTSTOCK_H_
Derive from TH1 will draw the graph.
Definition: THStock.h:59
"Clever" enumeration of the ListDataStock type : StockCSV, Volume, EMA, BOLL,...
Definition: Indicator.h:29
static ObjectLine * obj
no direct access to internal ObjectLine
static IndicatorObjectStock * CreateObjectStock(Indicator indic, std::string full_name_indic, unsigned int size, THStock *parent, std::string opt_string=std::string())
create indicator object
Define concrete classes for ObjectStock.
Define a base class for drawing indicator only, they are sorted in ListDataStock object.
Regroup sub-hierarchy related to the LineObject :
static EColor MakeColor(const char str_color)
translate name to integer color in root
static ObjectLine * CreateDrawableObjectLine(int stage_draw, double valueX, double valueY, TypeLine mode_obj)
create specifically ObjectLine
Factory for all object stock.
for all ObjectLines
Definition: ObjectLine.h:33
TypeLine
c++ 11 style, used by both EditorObjectStock and ObjectLine cannot make dictionary with enum class ! ...
EStageDraw
define stages for drawing