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 Types | Protected Member Functions | Protected Attributes
ObjectLine Class Reference

for all ObjectLines More...

#include <ObjectLine.h>

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

Public Member Functions

 ObjectLine ()
 
 ObjectLine (TypeLine tline, double valuey0)
 constructor used by Factory More...
 
 ObjectLine (double x0, double y0, double x1, double y1)
 general constructor More...
 
virtual ~ObjectLine ()
 destructor, should delete TLine explicitely More...
 
virtual std::string GetNameObject () const
 pure-virtual access More...
 
virtual void SetNameObject (std::string &name)
 
double GetX0 () const
 wrapper functions to fline, need public for all ?? More...
 
double GetX1 () const
 
double GetY0 () const
 
double GetY1 () const
 
void SetX0 (double x0)
 
void SetX1 (double x1)
 
void SetY0 (double y0)
 
void SetY1 (double y1)
 
virtual void SetValues (unsigned int, std::vector< double >, double, double, time_t, UInt_t=0)
 
virtual Width_t GetLineWidth () const
 
virtual Color_t GetLineColor () const
 
virtual Style_t GetLineStyle () const
 
virtual void SetLineWidth (Width_t lwidth)
 
virtual void SetLineColor (Color_t color)
 
virtual void SetLineStyle (Style_t lstyle)
 
virtual Int_t GetModeLine () const
 
virtual bool IsLine ()
 
virtual bool IsHalfLine1 ()
 
virtual bool IsHalfLine2 ()
 
virtual bool IsSegment ()
 
virtual void SetModekLine ()
 
virtual void SetModekHalfLine1 ()
 
virtual void SetModekHalfLine2 ()
 
virtual void SetModekSegment ()
 
virtual TypeLine GetTypeLine () const
 
virtual bool IsSupport () const
 
virtual bool IsTendance () const
 
virtual void GetExtrema (double &, double &) const
 
virtual void Resize (unsigned int)
 
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 SetObjectStock (ListDataStockBase *, CommonXAxis *, Hparam_stock_t &)
 used for from the listdata More...
 
virtual void Paint (const Option_t *="")
 Paint the objet, to overide. More...
 
virtual void ExecuteEvent (Int_t, Int_t, Int_t)
 
 ClassDef (ObjectLine, 1)
 
- 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 std::vector< std::string > MakeStringForStatusBar (int, int) const =0
 create the string for the StatusBar More...
 
virtual unsigned int GetSize () 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 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 void SetLineColorObject (Color_t)
 
 ClassDef (AbstractObjectStock, 1)
 

Protected Types

enum  ModeLine { kLine = 0, kHalfLine1 = 1, kHalfLine2 = 2, kSegment = 3 }
 

Protected Member Functions

void InitLine (double x0, double y0, double x1, double y1)
 
virtual std::vector< float > GetValues (int px, int py, time_t &date) const
 used by MakeStringForStatusBar only base in ObjectLine should be very simple More...
 

Protected Attributes

std::string name_line
 add a name, absent in AbstractObjectStock More...
 
ModeLine fModeLine
 kLine, kSegment, kHalfSegment0, kHalfSegment1 More...
 
TypeLine fTypeLine
 TypeLine, enum : kNone, kSupport, kTendance, kFibo. More...
 
TLine * fline
 use composition TLine*, valable for all derived class 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

for all ObjectLines

Simpler if it inherits here from TattLine Mainly a wrapper around TLine, define most common data member

Definition at line 33 of file ObjectLine.h.

Member Enumeration Documentation

enum ObjectLine::ModeLine
protected
Enumerator
kLine 
kHalfLine1 
kHalfLine2 
kSegment 

Definition at line 43 of file ObjectLine.h.

Constructor & Destructor Documentation

ObjectLine::ObjectLine ( )

Definition at line 63 of file ObjectLine.cxx.

ObjectLine::ObjectLine ( TypeLine  tline,
double  valuey0 
)

constructor used by Factory

Definition at line 71 of file ObjectLine.cxx.

References fTypeLine, and InitLine().

Here is the call graph for this function:

ObjectLine::ObjectLine ( double  x0,
double  y0,
double  x1,
double  y1 
)

general constructor

Definition at line 84 of file ObjectLine.cxx.

References InitLine().

Here is the call graph for this function:

virtual ObjectLine::~ObjectLine ( )
inlinevirtual

destructor, should delete TLine explicitely

Definition at line 72 of file ObjectLine.h.

References fline.

Member Function Documentation

ObjectLine::ClassDef ( ObjectLine  ,
 
)
virtual int ObjectLine::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 151 of file ObjectLine.h.

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

Definition at line 126 of file ObjectLine.cxx.

References fline.

virtual void ObjectLine::ExecuteEvent ( Int_t  ,
Int_t  ,
Int_t   
)
inlinevirtual

Reimplemented in ObjectLineTendance, and ObjectLineIndicator.

Definition at line 161 of file ObjectLine.h.

virtual void ObjectLine::GetExtrema ( double &  ,
double &   
) const
inlinevirtual

Implements AbstractObjectStock.

Reimplemented in ObjectLineIndicator.

Definition at line 138 of file ObjectLine.h.

virtual Color_t ObjectLine::GetLineColor ( ) const
inlinevirtual

Definition at line 111 of file ObjectLine.h.

References fline.

virtual Style_t ObjectLine::GetLineStyle ( ) const
inlinevirtual

Definition at line 112 of file ObjectLine.h.

References fline.

virtual Width_t ObjectLine::GetLineWidth ( ) const
inlinevirtual

Definition at line 110 of file ObjectLine.h.

References fline.

virtual Int_t ObjectLine::GetModeLine ( ) const
inlinevirtual

Definition at line 119 of file ObjectLine.h.

References fModeLine.

virtual std::string ObjectLine::GetNameObject ( ) const
inlinevirtual

pure-virtual access

Implements AbstractObjectStock.

Definition at line 80 of file ObjectLine.h.

References name_line.

Referenced by ObjectLineIndicator::MakeStringForStatusBar().

Here is the caller graph for this function:

virtual TypeLine ObjectLine::GetTypeLine ( ) const
inlinevirtual

Definition at line 133 of file ObjectLine.h.

References fTypeLine.

Referenced by FactoryObjectStock::CreateDrawableObjectLine().

Here is the caller graph for this function:

std::vector< float > ObjectLine::GetValues ( int  px,
int  py,
time_t &  date 
) const
protectedvirtual

used by MakeStringForStatusBar only base in ObjectLine should be very simple

Definition at line 95 of file ObjectLine.cxx.

References AbstractObjectStock::fParentTHStock, THStock::GetDateBinFromPixel(), Utils::Time_tToString(), and values.

Referenced by ObjectLineTendance::MakeStringForStatusBar().

Here is the call graph for this function:

Here is the caller graph for this function:

double ObjectLine::GetX0 ( ) const
inline

wrapper functions to fline, need public for all ??

Definition at line 95 of file ObjectLine.h.

References fline.

Referenced by THStock::Add(), FactoryObjectStock::CreateDrawableObjectLine(), ObjectLineTendance::ExecuteEvent(), and ObjectLineTendance::FinaliseDrawableLine().

Here is the caller graph for this function:

double ObjectLine::GetX1 ( ) const
inline

Definition at line 96 of file ObjectLine.h.

References fline.

Referenced by THStock::Add(), FactoryObjectStock::CreateDrawableObjectLine(), ObjectLineTendance::ExecuteEvent(), and ObjectLineTendance::FinaliseDrawableLine().

Here is the caller graph for this function:

double ObjectLine::GetY0 ( ) const
inline
double ObjectLine::GetY1 ( ) const
inline
void ObjectLine::InitLine ( double  x0,
double  y0,
double  x1,
double  y1 
)
protected

Referenced by ObjectLine(), and ObjectLineTendance::ObjectLineTendance().

Here is the caller graph for this function:

virtual bool ObjectLine::IsHalfLine1 ( )
inlinevirtual

Definition at line 121 of file ObjectLine.h.

References fModeLine, and kHalfLine1.

Referenced by ObjectLineTendance::SetObjectStock().

Here is the caller graph for this function:

virtual bool ObjectLine::IsHalfLine2 ( )
inlinevirtual

Definition at line 122 of file ObjectLine.h.

References fModeLine, and kHalfLine2.

Referenced by ObjectLineTendance::SetObjectStock().

Here is the caller graph for this function:

virtual bool ObjectLine::IsLine ( )
inlinevirtual

Definition at line 120 of file ObjectLine.h.

References fModeLine, and kLine.

Referenced by ObjectLineTendance::SetObjectStock().

Here is the caller graph for this function:

virtual bool ObjectLine::IsSegment ( )
inlinevirtual

Definition at line 123 of file ObjectLine.h.

References fModeLine, and kSegment.

Referenced by ObjectLineTendance::SetObjectStock().

Here is the caller graph for this function:

virtual bool ObjectLine::IsSupport ( ) const
inlinevirtual

Definition at line 134 of file ObjectLine.h.

References fTypeLine, and kSupport.

Referenced by ObjectLineTendance::ExecuteEvent(), and ObjectLineTendance::MakeStringForStatusBar().

Here is the caller graph for this function:

virtual bool ObjectLine::IsTendance ( ) const
inlinevirtual

Definition at line 135 of file ObjectLine.h.

References fTypeLine, and kTendance.

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

Paint the objet, to overide.

Implements AbstractObjectStock.

Reimplemented in ObjectLineTendance.

Definition at line 144 of file ObjectLine.cxx.

References fline.

virtual void ObjectLine::Resize ( unsigned int  )
inlinevirtual

Reimplemented from AbstractObjectStock.

Definition at line 142 of file ObjectLine.h.

virtual void ObjectLine::SetLineColor ( Color_t  color)
inlinevirtual

Definition at line 114 of file ObjectLine.h.

References fline.

Referenced by FactoryObjectStock::CreateDrawableObjectLine(), and FactoryObjectStock::CreateObjectStock().

Here is the caller graph for this function:

virtual void ObjectLine::SetLineStyle ( Style_t  lstyle)
inlinevirtual

Definition at line 115 of file ObjectLine.h.

References fline.

virtual void ObjectLine::SetLineWidth ( Width_t  lwidth)
inlinevirtual

Definition at line 113 of file ObjectLine.h.

References fline.

virtual void ObjectLine::SetModekHalfLine1 ( )
inlinevirtual

Definition at line 128 of file ObjectLine.h.

References fModeLine, and kHalfLine1.

virtual void ObjectLine::SetModekHalfLine2 ( )
inlinevirtual

Definition at line 129 of file ObjectLine.h.

References fModeLine, and kHalfLine2.

virtual void ObjectLine::SetModekLine ( )
inlinevirtual

Definition at line 127 of file ObjectLine.h.

References fModeLine, and kLine.

virtual void ObjectLine::SetModekSegment ( )
inlinevirtual

Definition at line 130 of file ObjectLine.h.

References fModeLine, and kSegment.

virtual void ObjectLine::SetNameObject ( std::string &  name)
inlinevirtual

Definition at line 82 of file ObjectLine.h.

References name_line.

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

used for from the listdata

Reimplemented from AbstractObjectStock.

Reimplemented in ObjectLineTendance, and ObjectLineIndicator.

Definition at line 155 of file ObjectLine.h.

virtual void ObjectLine::SetValues ( unsigned int  ,
std::vector< double >  ,
double  ,
double  ,
time_t  ,
UInt_t  = 0 
)
inlinevirtual

Definition at line 107 of file ObjectLine.h.

void ObjectLine::SetX0 ( double  x0)
inline

Definition at line 100 of file ObjectLine.h.

References fline.

Referenced by ObjectLineTendance::ExecuteEvent(), ObjectLineTendance::FinaliseDrawableLine(), ObjectLineIndicator::SetObjectStock(), and ObjectLineTendance::SetObjectStock().

Here is the caller graph for this function:

void ObjectLine::SetX1 ( double  x1)
inline
void ObjectLine::SetY0 ( double  y0)
inline
void ObjectLine::SetY1 ( double  y1)
inline

Field Documentation

TLine* ObjectLine::fline
protected
ModeLine ObjectLine::fModeLine
protected
TypeLine ObjectLine::fTypeLine
protected

TypeLine, enum : kNone, kSupport, kTendance, kFibo.

Definition at line 48 of file ObjectLine.h.

Referenced by GetTypeLine(), IsSupport(), IsTendance(), ObjectLine(), and ObjectLineTendance::ObjectLineTendance().

std::string ObjectLine::name_line
protected

add a name, absent in AbstractObjectStock

Definition at line 38 of file ObjectLine.h.

Referenced by GetNameObject(), ObjectLineIndicator::ObjectLineIndicator(), and SetNameObject().


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