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
CollectionObjectStock Class Reference

#include <ObjectStock.h>

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

Public Member Functions

 CollectionObjectStock ()
 
 CollectionObjectStock (std::string name)
 
 CollectionObjectStock (unsigned int size, std::string name_contained=std::string(), bool ref0=false)
 
virtual ~CollectionObjectStock ()
 
virtual void SetParent (THStock *thstock)
 different from AbstractObjectStock, broadcast to all, needed ? could set to himself as well ? but not needed More...
 
virtual void AddToVecObject (AbstractObjectStock *obj)
 for all indicators, size and if update need to resize More...
 
virtual unsigned int GetSize () const
 
virtual void Resize (unsigned int new_size)
 
virtual void GetExtrema (double &min, double &max) const
 overide base class More...
 
virtual void SetValues (UInt_t bin, std::vector< double > values, Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0)
 
virtual void ClearObjectStock ()
 Call ClearObject on every objects contained in the collection. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py, AbstractObjectStock **obj)
 
virtual int DistancetoPoint (int, int, double &, int=-1) const
 called by THStock for anchoring. More...
 
virtual void Paint (const Option_t *="")
 Paint the objet, to overide. More...
 
virtual void SetObjectStock (ListDataStockBase *ldata, CommonXAxis *fcommon_xaxis_th, Hparam_stock_t &Hparam_stock)
 called by , here need to send the correct ldata, but cannot split ldata so need to set up manually More...
 
 ClassDef (CollectionObjectStock, 1)
 
- Public Member Functions inherited from IndicatorObjectStock
 IndicatorObjectStock ()
 
 IndicatorObjectStock (std::string name)
 
virtual ~IndicatorObjectStock ()
 
virtual std::string GetNameObject () const
 
virtual void SetNameObject (std::string &new_name)
 
virtual std::vector< std::string > MakeStringForStatusBar (int, int) const
 create the string for the StatusBar More...
 
virtual void SetLineColorObject (Color_t lcolor)
 called by THStock::SetColor More...
 
- Public Member Functions inherited from AbstractObjectStock
 AbstractObjectStock ()
 default constructor More...
 
virtual ~AbstractObjectStock ()
 virtual default destructor, needed More...
 
virtual THStockGetParent () const
 public access to parent THStock More...
 
virtual void SetToPaint (bool k)
 Public access to kPaint. More...
 
virtual bool ToPaint () const
 
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 Int_t DistancetoPrimitive (int, int, AbstractObjectStock **)=0
 used for selection of object, for const need attention to the pointer More...
 
 ClassDef (AbstractObjectStock, 1)
 

Protected Attributes

std::vector
< AbstractObjectStock * > 
vec_object
 slight difference with ListObjectStock, here pointer to object, not object More...
 
- Protected Attributes inherited from IndicatorObjectStock
std::string name_indic
 add a name to the base class
convenient to get a indicator, can retrieve from the name... More...
 
- Protected Attributes inherited from AbstractObjectStock
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...
 

Additional Inherited Members

- Protected Member Functions inherited from IndicatorObjectStock
void ComputeBinRange (ListDataStockBase *ldata, CommonXAxis *fcommon_xaxis_th, Hparam_stock_t &Hparam_stock, unsigned int &xfirst, unsigned int &xlast, int &shift_left)
 set up bin first/ last. More...
 

Detailed Description

Definition at line 198 of file ObjectStock.h.

Constructor & Destructor Documentation

CollectionObjectStock::CollectionObjectStock ( )
inline

Definition at line 205 of file ObjectStock.h.

CollectionObjectStock::CollectionObjectStock ( std::string  name)
inline

Definition at line 206 of file ObjectStock.h.

CollectionObjectStock::CollectionObjectStock ( unsigned int  size,
std::string  name_contained = std::string(),
bool  ref0 = false 
)

Definition at line 736 of file ObjectStock.cxx.

CollectionObjectStock::~CollectionObjectStock ( )
virtual

Definition at line 747 of file ObjectStock.cxx.

References vec_object.

Member Function Documentation

void CollectionObjectStock::AddToVecObject ( AbstractObjectStock )
virtual

for all indicators, size and if update need to resize

Reimplemented from IndicatorObjectStock.

Definition at line 785 of file ObjectStock.cxx.

References vec_object.

CollectionObjectStock::ClassDef ( CollectionObjectStock  ,
 
)
void CollectionObjectStock::ClearObjectStock ( )
virtual

Call ClearObject on every objects contained in the collection.

Reimplemented from IndicatorObjectStock.

Definition at line 845 of file ObjectStock.cxx.

References vec_object.

virtual int CollectionObjectStock::DistancetoPoint ( int  ,
int  ,
double &  ,
int  bin = -1 
) const
inlinevirtual

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

Implements AbstractObjectStock.

Definition at line 236 of file ObjectStock.h.

int CollectionObjectStock::DistancetoPrimitive ( Int_t  px,
Int_t  py,
AbstractObjectStock **  obj 
)
virtual

Definition at line 856 of file ObjectStock.cxx.

References vec_object.

void CollectionObjectStock::GetExtrema ( double &  min,
double &  max 
) const
virtual

overide base class

Implements AbstractObjectStock.

Definition at line 803 of file ObjectStock.cxx.

References vec_object.

virtual unsigned int CollectionObjectStock::GetSize ( ) const
inlinevirtual

Reimplemented from AbstractObjectStock.

Definition at line 222 of file ObjectStock.h.

References vec_object.

void CollectionObjectStock::Paint ( const Option_t *  = "")
virtual

Paint the objet, to overide.

Implements AbstractObjectStock.

Definition at line 892 of file ObjectStock.cxx.

References AbstractObjectStock::ToPaint(), and vec_object.

Here is the call graph for this function:

void CollectionObjectStock::Resize ( unsigned int  new_size)
virtual

Reimplemented from AbstractObjectStock.

Definition at line 794 of file ObjectStock.cxx.

References vec_object.

void CollectionObjectStock::SetObjectStock ( ListDataStockBase ldata,
CommonXAxis fcommon_xaxis_th,
Hparam_stock_t Hparam_stock 
)
virtual

called by , here need to send the correct ldata, but cannot split ldata so need to set up manually

Reimplemented from AbstractObjectStock.

Definition at line 911 of file ObjectStock.cxx.

References IndicatorObjectStock::ComputeBinRange(), DataStock::GetDate(), ListDataStockBase::GetSize(), DataStock::GetValues(), CommonXAxis::GetXAxis(), ListDataStockBase::NoChronologicAt(), SetValues(), values, and vec_object.

Here is the call graph for this function:

void CollectionObjectStock::SetParent ( THStock thstock)
virtual

different from AbstractObjectStock, broadcast to all, needed ? could set to himself as well ? but not needed

Reimplemented from AbstractObjectStock.

Definition at line 763 of file ObjectStock.cxx.

References vec_object.

void CollectionObjectStock::SetValues ( UInt_t  bin,
std::vector< double >  values,
Double_t  xmin,
Double_t  xmax,
time_t  date,
UInt_t  opt_value = 0 
)
virtual

Definition at line 824 of file ObjectStock.cxx.

References vec_object.

Referenced by SetObjectStock().

Here is the caller graph for this function:

Field Documentation

std::vector<AbstractObjectStock *> CollectionObjectStock::vec_object
protected

slight difference with ListObjectStock, here pointer to object, not object

Definition at line 202 of file ObjectStock.h.

Referenced by AddToVecObject(), ClearObjectStock(), DistancetoPrimitive(), GetExtrema(), GetSize(), Paint(), Resize(), SetObjectStock(), SetParent(), SetValues(), and ~CollectionObjectStock().


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