client-cpp  0.0.1-SNAPSHOT
kaa::RecordProcessStrategy Class Reference

#include <Strategies.hpp>

+ Inheritance diagram for kaa::RecordProcessStrategy:
+ Collaboration diagram for kaa::RecordProcessStrategy:

Public Member Functions

 RecordProcessStrategy (boost::function< bool(uuid_t)> isSubscribed, boost::function< void(uuid_t, boost::shared_ptr< ICommonRecord >)> subscribe, boost::function< void(uuid_t)> unsubscribe, bool isRootRecord=false)
 
void run (boost::shared_ptr< ICommonRecord > parent, const std::string &field, const avro::GenericDatum &datum)
 
- Public Member Functions inherited from kaa::AbstractStrategy
virtual ~AbstractStrategy ()
 

Detailed Description

Strategy to process a record. Can be used for processing both a "root" record (data should not be held in the record as the field, but overwritten as separate object) and a simple record as the field.

Definition at line 57 of file Strategies.hpp.

Constructor & Destructor Documentation

kaa::RecordProcessStrategy::RecordProcessStrategy ( boost::function< bool(uuid_t)>  isSubscribed,
boost::function< void(uuid_t, boost::shared_ptr< ICommonRecord >)>  subscribe,
boost::function< void(uuid_t)>  unsubscribe,
bool  isRootRecord = false 
)
inline

Definition at line 59 of file Strategies.hpp.

Member Function Documentation

void kaa::RecordProcessStrategy::run ( boost::shared_ptr< ICommonRecord parent,
const std::string &  field,
const avro::GenericDatum &  datum 
)
virtual

Routine for processing avro datum and insert field into a record by given name.

Parameters
parentRecord which has to contain data represented in datum.
fieldName of a field in a given record.
datumAvro datum containing data to be converted.

Implements kaa::AbstractStrategy.


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