added a default Node::process() routine which simply recurses

git-svn-id: svn://anubis/jtlc/trunk@16 f5bc74b8-7b62-4e90-9214-7121d538519f
This commit is contained in:
josh 2010-01-13 21:17:27 +00:00
parent 9c26b9593c
commit 3efad6cc0f
2 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,16 @@ void Node::addChildren(refptr<Node> other)
}
}
void Node::process(FILE * out)
{
for (vector< refptr<Node> >::const_iterator it = m_children.begin();
it != m_children.end();
it++)
{
(*it)->process(out);
}
}
Node::~Node()
{
}

View File

@ -19,7 +19,7 @@ class Node
virtual double getDouble() { return m_double; }
virtual uint64_t getInteger() { return m_integer; }
virtual std::string getString() { return m_string; }
virtual void process(FILE * out) { }
virtual void process(FILE * out);
protected:
std::vector< refptr<Node> > m_children;