Workspace 6.21.5
Public Member Functions | List of all members
UnchangedDataSeriesMapper Class Reference

Passes through each data series value unchanged.

#include <DataAnalysis/DataStructures/unchangeddataseriesmapper.h>

Inheritance diagram for UnchangedDataSeriesMapper:
[legend]

Public Member Functions

UnchangedDataSeriesMapperclone () const override
 
Application::Memento::DatacreateMementoData (const DataSeries &dataSeries) const override
 
bool getValue (int index, double srcValue, double &destValue, Application::Memento::Data &mementoData) const override
 
- Public Member Functions inherited from DataSeriesMapper
DataSeriesMapperclone () const override=0
 
virtual Application::Memento::DatacreateMementoData (const DataSeries &dataSeries) const =0
 
virtual bool getValue (int index, double srcValue, double &destValue, Application::Memento::Data &mementoData) const =0
 
void logText (const QString &msg) const
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Member Function Documentation

◆ clone()

UnchangedDataSeriesMapper * clone ( ) const
overridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

Implements DataSeriesMapper.

◆ createMementoData()

Application::Memento::Data * createMementoData ( const DataSeries dataSeries) const
overridevirtual
Parameters
dataSeriesThe model that will be used for mapping nodes to values.
Returns
A memento object which client code cannot do anything useful with except pass it around. The memento is ultimately only useful to the getValue() function. It holds internal data the mapper will use to perform the required mapping.

Implements DataSeriesMapper.

◆ getValue()

bool getValue ( int  index,
double  srcValue,
double &  destValue,
Application::Memento::Data mementoData 
) const
overridevirtual
Parameters
indexThe index of the item being mapped.
srcValueThe value of the source data series at the specified index.
destValueThe mapped value should be assigned to this before returning.
mementoDataMust be the same object supplied by a previous call to createMementoData().
Returns
True if the srcValue could be mapped. If there was some kind of error, false should be returned and the caller should not attempt to continue mapping values.

Implements DataSeriesMapper.