avro::Node Class Reference

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

#include <Node.hh>

Inheritance diagram for avro::Node:
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 std::string &name)
virtual const std::string & name () 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

Protected Member Functions

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

Friends

class ValidSchema

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:
Generated on Thu Sep 2 18:40:54 2010 for Avro C++ by  doxygen 1.6.3