OMNeT++ Simulation Library  5.6.1
cIHistogramStrategy Class Referenceabstract

#include <chistogramstrategy.h>

Description

Interface for histogram strategy classes. Histogram strategies encapsulate the task of setting up and managing the bins in a cHistogram.

Inheritance diagram for cIHistogramStrategy:
cObject cFixedRangeHistogramStrategy cPrecollectionBasedHistogramStrategy cAutoRangeHistogramStrategy cDefaultHistogramStrategy

Public Member Functions

Constructors, copying.
 cIHistogramStrategy ()
 
 cIHistogramStrategy (const cIHistogramStrategy &other)
 
cIHistogramStrategyoperator= (const cIHistogramStrategy &other)
 
Getting/setting the associated histogram object
void setHistogram (cHistogram *hist)
 
cHistogramgetHistogram () const
 
Methods called from cHistogram
virtual void collect (double value)=0
 
virtual void collectWeighted (double value, double weight)=0
 
virtual void setUpBins ()=0
 
virtual void clear ()=0
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
virtual const char * getName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual _OPPDEPRECATED std::string info () const
 
virtual _OPPDEPRECATED std::string detailedInfo () const
 
virtual cObjectdup () const
 
virtual void parsimPack (cCommBuffer *buffer) const
 
virtual void parsimUnpack (cCommBuffer *buffer)
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
void copyNotSupported () const
 

Additional Inherited Members

- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Member Function Documentation

◆ setHistogram()

void setHistogram ( cHistogram hist)

Set the cHistogram instance this strategy is associated with. This method is called from cHistogram::setStrategy().

◆ getHistogram()

cHistogram* getHistogram ( ) const
inline

Returns the cHistogram instance this strategy is associated with.

◆ collect()

virtual void collect ( double  value)
pure virtual

Called from cHistogram's collect() method. Implementations are expected to call back cHistogram's collectIntoHistogram(), or if histogram bins are not yet set up, store it for later.

Implemented in cAutoRangeHistogramStrategy, cDefaultHistogramStrategy, and cFixedRangeHistogramStrategy.

◆ collectWeighted()

virtual void collectWeighted ( double  value,
double  weight 
)
pure virtual

Called from cHistogram's collectWeighted() method. Implementations are expected to call back cHistogram's collectIntoHistogram(), or if histogram bins are not yet set up, store it for later.

Implemented in cAutoRangeHistogramStrategy, cDefaultHistogramStrategy, and cFixedRangeHistogramStrategy.

◆ setUpBins()

virtual void setUpBins ( )
pure virtual

cHistogram's setUpBins() method delegates here. Implementations are expected to create bins in the associated histogram by calling its setBinEdges() or createUniformBins() method, and move possibly existing precollected observations into the bins using collectIntoHistogram().

Implemented in cPrecollectionBasedHistogramStrategy, and cFixedRangeHistogramStrategy.

◆ clear()

virtual void clear ( )
pure virtual

Called from cHistogram's clear() method, to give the strategy object an opportunity to clear its state.

Implemented in cAutoRangeHistogramStrategy, cDefaultHistogramStrategy, cPrecollectionBasedHistogramStrategy, and cFixedRangeHistogramStrategy.


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