Protocol class that defines Processor interface.
More...
#include "keyvalue/mngt/Processor.h"

Public Member Functions | |
| virtual const char * | getName () const =0 |
| Gets Processor's name. | |
| virtual value::Result | getResult (const DataSet &data) const =0 |
| Gets result of processing a DataSet. | |
| virtual value::Result | getResult (const value::Variant &data) const =0 |
| Gets result of processing a value::Variant. | |
Protocol class that defines Processor interface.
| virtual const char* getName | ( | ) | const [pure virtual] |
Gets Processor's name.
Implemented in Builder< ObjectType >, and Calculator< Tag >.
| virtual value::Result getResult | ( | const DataSet & | data | ) | const [pure virtual] |
Gets result of processing a DataSet.
| data | : DataSet to be processed. |
This is a low level method which bypasses the memoization technique implemented by DataSet (see DataSet::mustUpdate()). Therefore, if processor is a Processor and data is a DataSet, then rather than processor.getResult(data); call data.process(processor);
processor.getResult(const DataSet& data) call data.process(processor).
Implemented in Builder< ObjectType >, and Calculator< Tag >.
| virtual value::Result getResult | ( | const value::Variant & | data | ) | const [pure virtual] |
Gets result of processing a value::Variant.
In general, the data that processors need to perform their duties is so rich that must be stored in a DataSet. Nevertheless, in some particular cases, a single value::Variant might be enough. For instance, consider a builder that creates a curve given a few points on it. Normally, this processor needs the set of points together with interpolator and extrapolator methods. In this general case, a DataSet is necessary to hold all this information. However, when the curve is known to be constant, then a single number - the constant - is enough to build the whole curve. Rather than creating a DataSet to store a single double value, it would be more convenient if the processor could accept just this value (or more generally, a value::Variant). That is the reason for this method.
| data | : value::Variant to be processed. |
Implemented in Builder< ObjectType >, and Calculator< Tag >.
1.6.1