ResolvingReader.hh

00001 
00020 #ifndef avro_ResolvingReader_hh__
00021 #define avro_ResolvingReader_hh__
00022 
00023 #include <stdint.h>
00024 #include <boost/noncopyable.hpp>
00025 
00026 #include "ResolverSchema.hh"
00027 #include "Reader.hh"
00028 
00029 namespace avro {
00030 
00031 class InputStreamer;
00032 
00033 class ResolvingReader : private boost::noncopyable
00034 {
00035 
00036   public:
00037 
00038     ResolvingReader(const ResolverSchema &schema, InputStreamer &in) :
00039         reader_(in),
00040         schema_(schema)
00041     {}
00042 
00043     template<typename T>
00044     void parse(T &object) {
00045         schema_.parse(reader_, reinterpret_cast<uint8_t *>(&object));
00046     }
00047 
00048   private:
00049 
00050     Reader reader_;
00051     ResolverSchema schema_;
00052 };
00053 
00054 } // namespace avro
00055 
00056 #endif

Generated on Tue Feb 23 15:31:29 2010 for Avro C++ by  doxygen 1.6.1