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 | Private Types | Private Attributes
ListObjectStock< T > Class Template Reference

Define a vector for all identical Object ( Candle, Bar...) More...

#include <ListObjectStock.h>

Inheritance diagram for ListObjectStock< T >:
Inheritance graph
[legend]
Collaboration diagram for ListObjectStock< T >:
Collaboration graph
[legend]

Public Member Functions

 ListObjectStock ()
 
 ListObjectStock (std::string name)
 
 ListObjectStock (unsigned int size, std::string name_contained=std::string(), bool ref0=false)
 
virtual ~ListObjectStock ()
 
virtual UInt_t GetSize () const
 
virtual void Resize (unsigned int new_size)
 
virtual void GetExtrema (double &min, double &max) const
 overid base class More...
 
virtual void AddToVecObject (T *obj)
 
virtual void SetValues (UInt_t bin, std::vector< type_value_data > values, Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0)
 called by SetObjectStock. More...
 
virtual void ClearObjectStock ()
 general function called when drawing More...
 
virtual int DistancetoPrimitive (int px, int py, AbstractObjectStock **obj)
 neeed for selection broadcast to the contained objects More...
 
virtual int DistancetoPoint (int px, int py, double &yvalue, int bin=-1) const
 needed for anchoring, broadcast to the contained objects More...
 
virtual void Paint (const Option_t *="")
 Simply paint the objects, if needed
. More...
 
virtual void SetObjectStock (ListDataStockBase *ldata, CommonXAxis *fcommon_xaxis_th, Hparam_stock_t &Hparam_stock)
 Set the values of the objects
. More...
 
- 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 AddToVecObject (AbstractObjectStock *)
 for all indicators, size and if update need to resize 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 SetParent (THStock *thstock)
 
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...
 
 ClassDef (AbstractObjectStock, 1)
 

Private Types

typedef T type_obj
 

Private Attributes

std::vector< type_objvec_object
 

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

Detailed Description

template<class T>
class ListObjectStock< T >

Define a vector for all identical Object ( Candle, Bar...)

Design, no knowledge about ListDataStock *, should be send as parameter to SetObjectStock Good : sort of decoupling Bad : more simple ?? really not sure...

Use IndicatorObjectStock as parent, can use the name\ Used for StockCSV, Volume and other indicator

Definition at line 34 of file ListObjectStock.h.

Member Typedef Documentation

template<class T>
typedef T ListObjectStock< T >::type_obj
private

Definition at line 37 of file ListObjectStock.h.

Constructor & Destructor Documentation

template<class T >
ListObjectStock< T >::ListObjectStock ( )

Definition at line 84 of file ListObjectStock.h.

template<class T>
ListObjectStock< T >::ListObjectStock ( std::string  name)
inline

Definition at line 42 of file ListObjectStock.h.

template<class T >
ListObjectStock< T >::ListObjectStock ( unsigned int  size,
std::string  name_contained = std::string(),
bool  ref0 = false 
)

Definition at line 93 of file ListObjectStock.h.

References ListObjectStock< T >::vec_object.

template<class T >
ListObjectStock< T >::~ListObjectStock ( )
virtual

Definition at line 109 of file ListObjectStock.h.

Member Function Documentation

template<class T>
virtual void ListObjectStock< T >::AddToVecObject ( T *  obj)
inlinevirtual

Definition at line 54 of file ListObjectStock.h.

References ListObjectStock< T >::vec_object.

template<class T >
void ListObjectStock< T >::ClearObjectStock ( )
virtual

general function called when drawing

Reimplemented from IndicatorObjectStock.

Definition at line 172 of file ListObjectStock.h.

template<class T >
int ListObjectStock< T >::DistancetoPoint ( int  px,
int  py,
double &  yvalue,
int  bin = -1 
) const
virtual

needed for anchoring, broadcast to the contained objects

Implements AbstractObjectStock.

Definition at line 226 of file ListObjectStock.h.

template<class T >
int ListObjectStock< T >::DistancetoPrimitive ( int  px,
int  py,
AbstractObjectStock **  obj 
)
virtual

neeed for selection broadcast to the contained objects

Implements AbstractObjectStock.

Definition at line 199 of file ListObjectStock.h.

References AbstractObjectStock::DistancetoPrimitive().

Here is the call graph for this function:

template<class T >
void ListObjectStock< T >::GetExtrema ( double &  min,
double &  max 
) const
virtual

overid base class

Parameters
min
max

Implements AbstractObjectStock.

Definition at line 137 of file ListObjectStock.h.

template<class T>
virtual UInt_t ListObjectStock< T >::GetSize ( ) const
inlinevirtual

Reimplemented from AbstractObjectStock.

Definition at line 48 of file ListObjectStock.h.

References ListObjectStock< T >::vec_object.

template<class T >
void ListObjectStock< T >::Paint ( const Option_t *  option = "")
virtual

Simply paint the objects, if needed
.

Splitted from painting, THistStockPainter need different steps More flexible ( and much less code )

Implements AbstractObjectStock.

Definition at line 269 of file ListObjectStock.h.

template<class T >
void ListObjectStock< T >::Resize ( unsigned int  new_size)
virtual

Reimplemented from AbstractObjectStock.

Definition at line 186 of file ListObjectStock.h.

template<class T >
void ListObjectStock< T >::SetObjectStock ( ListDataStockBase ldata,
CommonXAxis fcommon_xaxis_th,
Hparam_stock_t Hparam_stock 
)
virtual

Set the values of the objects
.

Particularly set xmin, xmax to the object when a change is done Maybe unnecessary to recopy the data again and again, to see when slider fully implemented Or when the gui is modified

Reimplemented from AbstractObjectStock.

Definition at line 289 of file ListObjectStock.h.

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

Here is the call graph for this function:

template<class T >
void ListObjectStock< T >::SetValues ( UInt_t  bin,
std::vector< type_value_data values,
Double_t  xmin,
Double_t  xmax,
time_t  date,
UInt_t  opt_value = 0 
)
virtual

called by SetObjectStock.


Assume if Set it will be painted.

Definition at line 249 of file ListObjectStock.h.

Field Documentation

template<class T>
std::vector<type_obj> ListObjectStock< T >::vec_object
private

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