Avro C++
Public Member Functions | Protected Member Functions
avro::Node Class Reference

Node is the building block for parse trees. More...

#include <Node.hh>

Inheritance diagram for avro::Node:
noncopyable avro::NodeImpl< NameConcept, LeavesConcept, LeafNamesConcept, SizeConcept > avro::NodeArray avro::NodeEnum avro::NodeFixed avro::NodeMap avro::NodePrimitive avro::NodeRecord avro::NodeSymbolic avro::NodeUnion

List of all members.

Public Member Functions

 Node (Type type)
Type type () const
void lock ()
bool locked () const
virtual bool hasName () const =0
void setName (const Name &name)
virtual const Namename () const =0
void addLeaf (const NodePtr &newLeaf)
virtual size_t leaves () const =0
virtual const NodePtr & leafAt (int index) const =0
void addName (const std::string &name)
virtual size_t names () const =0
virtual const std::string & nameAt (int index) const =0
virtual bool nameIndex (const std::string &name, size_t &index) const =0
void setFixedSize (int size)
virtual int fixedSize () const =0
virtual bool isValid () const =0
virtual SchemaResolution resolve (const Node &reader) const =0
virtual void printJson (std::ostream &os, int depth) const =0
virtual void printBasicInfo (std::ostream &os) const =0
virtual void setLeafToSymbolic (int index, const NodePtr &node)=0

Protected Member Functions

void checkLock () const
virtual void checkName (const Name &name) const
virtual void doSetName (const Name &name)=0
virtual void doAddLeaf (const NodePtr &newLeaf)=0
virtual void doAddName (const std::string &name)=0
virtual void doSetFixedSize (int size)=0

Detailed Description

Node is the building block for parse trees.

Each node represents an avro type. Compound types have leaf nodes that represent the types they are composed of.

The user does not use the Node object directly, they interface with Schema objects.

The Node object uses reference-counted pointers. This is so that schemas may be reused in other other schemas, without needing to worry about memory deallocation for nodes that are added to multiple schema parse trees.

Node has minimal implementation, serving as an abstract base class for different node types.

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