Public Member Functions | Private Member Functions | Friends

Processor Class Reference

Protocol class which defines Processor interface. More...

#include <keyvalue/mngt/Processor.h>

Inheritance diagram for Processor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const char * getName () const =0
 Gets Processor's name.

Private Member Functions

virtual value::Result getResult (const DataSet &data) const =0
 Gets result of processing a DataSet.

Friends

class DataSet

Detailed Description

Protocol class which defines Processor interface.

This is the abstract base class for all processors. Since this class is abstract, it cannot be instantiated to build or calculate a particular type of object or value. When one wants to build or calculate a known type of result, then he/she must use ProcessorInstantiator.


Member Function Documentation

virtual const char* getName (  )  const [pure virtual]

Gets Processor's name.

Returns:
The name.

Implemented in Builder< Tag >, and Calculator< Tag >.

virtual value::Result getResult ( const DataSet data  )  const [private, pure virtual]

Gets result of processing a DataSet.

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);

one should use

 data.process(processor);

Actually, the latter calls the former adding memoization support.

Parameters:
data : DataSet to be processed.
Returns:
The result.

Implemented in Builder< Tag >, and Calculator< Tag >.