jtlc/nodes/Node.cc
josh 7b8436acb4 added Compiler class to pass to Node::process() instead of a FILE *
git-svn-id: svn://anubis/jtlc/trunk@22 f5bc74b8-7b62-4e90-9214-7121d538519f
2010-01-14 20:27:01 +00:00

33 lines
579 B
C++

#include <vector>
#include "Node.h"
#include "util/refptr.h"
using namespace std;
void Node::addChildren(refptr<Node> other)
{
if (other.isNull())
return;
for (vector< refptr<Node> >::const_iterator it = other->m_children.begin();
it != other->m_children.end();
it++)
{
addChild(*it);
}
}
void Node::process(refptr<Compiler> compiler)
{
for (vector< refptr<Node> >::const_iterator it = m_children.begin();
it != m_children.end();
it++)
{
(*it)->process(compiler);
}
}
Node::~Node()
{
}