ValidSchema.hh

00001 
00019 #ifndef avro_ValidSchema_hh__ 
00020 #define avro_ValidSchema_hh__ 
00021 
00022 #include "Node.hh"
00023 
00024 namespace avro {
00025 
00026 class Schema;
00027 class SymbolMap;
00028 
00039 
00040 class ValidSchema 
00041 {
00042   public:
00043 
00044     explicit ValidSchema(const Schema &schema);
00045     explicit ValidSchema(const ValidSchema &schema);
00046     ValidSchema();
00047 
00048     void setSchema(const Schema &schema);
00049 
00050     const NodePtr &root() const {
00051         return root_;
00052     }
00053 
00054     void toJson(std::ostream &os) const;
00055 
00056     void toFlatList(std::ostream &os) const;
00057 
00058   protected:
00059 
00060     bool validate(const NodePtr &node, SymbolMap &symbolMap);
00061 
00062     NodePtr root_;
00063 
00064   private:
00065 
00066     // not implemented, only copy construct allowed
00067     ValidSchema &operator=(const Schema &rhs);
00068 
00069 };
00070 
00071 } // namespace avro
00072 
00073 #endif
Generated on Thu Sep 2 18:40:54 2010 for Avro C++ by  doxygen 1.6.3