Avro C++
Public Member Functions | Protected Attributes | List of all members
avro::ValidSchema Class Reference

A ValidSchema is basically a non-mutable Schema that has passed some minumum of sanity checks. More...

#include <ValidSchema.hh>

Public Member Functions

 ValidSchema (const NodePtr &root)
 
 ValidSchema (const Schema &schema)
 
void setSchema (const Schema &schema)
 
const NodePtr & root () const
 
void toJson (std::ostream &os) const
 
std::string toJson (bool prettyPrint=true) const
 
void toFlatList (std::ostream &os) const
 

Protected Attributes

NodePtr root_
 

Detailed Description

A ValidSchema is basically a non-mutable Schema that has passed some minumum of sanity checks.

Once valididated, any Schema that is part of this ValidSchema is considered locked, and cannot be modified (an attempt to modify a locked Schema will throw). Also, as it is validated, any recursive duplications of schemas are replaced with symbolic links to the original.

Once a Schema is converted to a valid schema it can be used in validating parsers/serializers, converted to a json schema, etc.


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