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

Define an abstract base class for all objects to be painted in a THStock. More...

#include <AbstractObjectStock.h>

Inheritance diagram for AbstractObjectStock:
Inheritance graph
[legend]
Collaboration diagram for AbstractObjectStock:
Collaboration graph
[legend]

Public Member Functions

 AbstractObjectStock ()
 default constructor More...
 
virtual ~AbstractObjectStock ()
 virtual default destructor, needed More...
 
virtual std::string GetNameObject () const =0
 pure-virtual access More...
 
virtual THStockGetParent () const
 public access to parent THStock More...
 
virtual void SetParent (THStock *thstock)
 
virtual void SetToPaint (bool k)
 Public access to kPaint. More...
 
virtual bool ToPaint () const
 
virtual std::vector< std::string > MakeStringForStatusBar (int, int) const =0
 create the string for the StatusBar More...
 
virtual unsigned int GetSize () const
 
virtual void Resize (unsigned int)
 
virtual void SetValues (unsigned int bin, std::vector< double > values, double xmin, double ymax, time_t date, unsigned int opt_value=0)=0
 more general call for setting the values, even ObjectLine ?? no use/need but maybe if protected probelm compilation (private inherintence??) More...
 
virtual void GetExtrema (double &, double &) const =0
 
virtual void SetObjectStock (ListDataStockBase *, CommonXAxis *, Hparam_stock_t &)
 used for from the listdata More...
 
virtual void ClearObjectStock ()=0
 general function called when drawing More...
 
virtual Int_t DistancetoPrimitive (int, int, AbstractObjectStock **)=0
 used for selection of object, for const need attention to the pointer More...
 
virtual int DistancetoPoint (int, int, double &, int bin=-1) const =0
 called by THStock for anchoring. More...
 
virtual void Paint (const Option_t *="")=0
 Paint the objet, to overide. More...
 
virtual void SetLineColorObject (Color_t)
 
 ClassDef (AbstractObjectStock, 1)
 

Protected Attributes

THStockfParentTHStock
 
bool kPaint
 set to true if the object need be draw or not depend on common_xaxis and user input ( slider ) used by SetObject as well, good, efficient More...
 

Detailed Description

Define an abstract base class for all objects to be painted in a THStock.

Follow Abstract logical, most of functions are pure virtual

important pure virtual, need implementation :

Definition at line 64 of file AbstractObjectStock.h.

Constructor & Destructor Documentation

AbstractObjectStock::AbstractObjectStock ( )

default constructor

virtual AbstractObjectStock::~AbstractObjectStock ( )
inlinevirtual

virtual default destructor, needed

Definition at line 84 of file AbstractObjectStock.h.

Member Function Documentation

AbstractObjectStock::ClassDef ( AbstractObjectStock  ,
 
)
virtual void AbstractObjectStock::ClearObjectStock ( )
pure virtual
virtual int AbstractObjectStock::DistancetoPoint ( int  ,
int  ,
double &  ,
int  bin = -1 
) const
pure virtual

called by THStock for anchoring.


keep main idea from ROOT, add optional bin if provides faster access

Implemented only for Indicator

Parameters
pxin pixel
py
value,updatethe new value
bin
Returns
minimum distance to the closest point

Implemented in CollectionObjectStock, PStockLine, ObjectLine, BarStock, CandleStock, and ListObjectStock< T >.

virtual Int_t AbstractObjectStock::DistancetoPrimitive ( int  ,
int  ,
AbstractObjectStock **   
)
pure virtual

used for selection of object, for const need attention to the pointer

Implemented in PStockLine, BarStock, and ListObjectStock< T >.

Referenced by ListObjectStock< T >::DistancetoPrimitive().

Here is the caller graph for this function:

virtual void AbstractObjectStock::GetExtrema ( double &  ,
double &   
) const
pure virtual
virtual std::string AbstractObjectStock::GetNameObject ( ) const
pure virtual

pure-virtual access

Implemented in IndicatorObjectStock, BarStock, ObjectLine, and CandleStock.

virtual THStock* AbstractObjectStock::GetParent ( ) const
inlinevirtual

public access to parent THStock

Definition at line 92 of file AbstractObjectStock.h.

References fParentTHStock.

Referenced by TPadStock::ExecuteEvent().

Here is the caller graph for this function:

virtual unsigned int AbstractObjectStock::GetSize ( ) const
inlinevirtual

Reimplemented in CollectionObjectStock, PStockLine, and ListObjectStock< T >.

Definition at line 106 of file AbstractObjectStock.h.

virtual std::vector<std::string> AbstractObjectStock::MakeStringForStatusBar ( int  ,
int   
) const
pure virtual

create the string for the StatusBar

Implemented in ObjectLineTendance, IndicatorObjectStock, ObjectLineIndicator, PStockLine, BarStock, and CandleStock.

Referenced by MainIndicatorTHStockFrame::EventInfo().

Here is the caller graph for this function:

virtual void AbstractObjectStock::Paint ( const Option_t *  = "")
pure virtual

Paint the objet, to overide.

Implemented in ObjectLineTendance, CollectionObjectStock, PStockLine, ObjectLine, BarStock, CandleStock, and ListObjectStock< T >.

Referenced by THStock::PaintObjectStock().

Here is the caller graph for this function:

virtual void AbstractObjectStock::Resize ( unsigned int  )
inlinevirtual

Reimplemented in CollectionObjectStock, PStockLine, ObjectLine, and ListObjectStock< T >.

Definition at line 107 of file AbstractObjectStock.h.

virtual void AbstractObjectStock::SetLineColorObject ( Color_t  )
inlinevirtual
Todo:
check used by who ? why not working called by THStock::SetColor

Reimplemented in IndicatorObjectStock.

Definition at line 151 of file AbstractObjectStock.h.

virtual void AbstractObjectStock::SetObjectStock ( ListDataStockBase ,
CommonXAxis ,
Hparam_stock_t  
)
inlinevirtual

used for from the listdata

Reimplemented in ObjectLineTendance, CollectionObjectStock, ObjectLineIndicator, PStockLine, ObjectLine, and ListObjectStock< T >.

Definition at line 120 of file AbstractObjectStock.h.

virtual void AbstractObjectStock::SetParent ( THStock thstock)
inlinevirtual

Reimplemented in CollectionObjectStock.

Definition at line 93 of file AbstractObjectStock.h.

References fParentTHStock.

Referenced by FactoryObjectStock::CreateObjectStock(), and TPadStock::ExecuteEvent().

Here is the caller graph for this function:

virtual void AbstractObjectStock::SetToPaint ( bool  k)
inlinevirtual

Public access to kPaint.

Definition at line 96 of file AbstractObjectStock.h.

References kPaint.

virtual void AbstractObjectStock::SetValues ( unsigned int  bin,
std::vector< double >  values,
double  xmin,
double  ymax,
time_t  date,
unsigned int  opt_value = 0 
)
pure virtual

more general call for setting the values, even ObjectLine ?? no use/need but maybe if protected probelm compilation (private inherintence??)

virtual bool AbstractObjectStock::ToPaint ( ) const
inlinevirtual

Definition at line 97 of file AbstractObjectStock.h.

References kPaint.

Referenced by PStockLine::Paint(), CollectionObjectStock::Paint(), THStock::PaintObjectStock(), and THStock::SetObjectStock().

Here is the caller graph for this function:

Field Documentation

THStock* AbstractObjectStock::fParentTHStock
protected
bool AbstractObjectStock::kPaint
protected

set to true if the object need be draw or not depend on common_xaxis and user input ( slider ) used by SetObject as well, good, efficient

Definition at line 77 of file AbstractObjectStock.h.

Referenced by CandleStock::ClearObjectStock(), BarStock::ClearObjectStock(), SetToPaint(), and ToPaint().


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