17 #ifndef COMMON_RECORD_HPP_
18 #define COMMON_RECORD_HPP_
22 #ifdef KAA_USE_CONFIGURATION
26 #include <avro/Schema.hh>
27 #include <boost/ref.hpp>
32 class CommonRecord :
public ICommonRecord {
34 CommonRecord(uuid_t uuid,
const avro::NodePtr & schema);
36 const boost::any getValue()
const {
return boost::cref(*this).get(); }
37 const avro::NodePtr & getSchema()
const;
39 avro::GenericDatum toAvro()
const;
40 std::string toString()
const;
42 void setUuid(uuid_t uuid);
45 bool hasField (
const keys_type &field_name)
const;
46 fields_type getField (
const keys_type &field_name)
const;
47 void setField (
const keys_type &field_name, fields_type value);
48 void removeField (
const keys_type &field_name);
49 const container_type & getFields ()
const {
return fields_; }
52 container_type fields_;
53 avro::NodePtr schema_;