17 #ifndef FIELDPROCESSOR_HPP_
18 #define FIELDPROCESSOR_HPP_
22 #ifdef KAA_USE_CONFIGURATION
31 class FieldProcessor {
33 FieldProcessor(std::shared_ptr<ICommonRecord> parent,
const std::string &field)
34 : strategy_(nullptr), parentRecord_(parent), field_(field) {}
35 ~FieldProcessor() {
if (strategy_)
delete strategy_;}
42 void setStrategy(AbstractStrategy *strategy) { strategy_ = strategy; }
43 void process(
const avro::GenericDatum &d) {
44 strategy_->run(parentRecord_, field_, d);
48 AbstractStrategy * strategy_;
49 std::shared_ptr<ICommonRecord> parentRecord_;
50 const std::string &field_;