added IntegerNode type

git-svn-id: svn://anubis/jtlc/trunk@9 f5bc74b8-7b62-4e90-9214-7121d538519f
This commit is contained in:
josh 2010-01-12 21:42:13 +00:00
parent 798342ec0b
commit 425ed9d84c

View File

@ -14,6 +14,7 @@ class Node
void addChildren(refptr<Node> other);
std::vector< refptr<Node> > & getChildren() { return m_children; }
virtual unsigned long getInteger() { return 0ul; }
virtual std::string getString() { return ""; }
protected:
@ -21,14 +22,20 @@ class Node
};
class IntegerNode : public Node
{
public:
IntegerNode(unsigned long integer) { m_integer = integer; }
unsigned long getInteger() { return m_integer; }
protected:
unsigned long m_integer;
};
class StringNode : public Node
{
public:
StringNode(const std::string & str) { m_string = str; }
std::string getString()
{
return m_string;
}
std::string getString() { return m_string; }
protected:
std::string m_string;
};