added IntegerNode type
git-svn-id: svn://anubis/jtlc/trunk@9 f5bc74b8-7b62-4e90-9214-7121d538519f
This commit is contained in:
parent
798342ec0b
commit
425ed9d84c
@ -14,6 +14,7 @@ class Node
|
|||||||
void addChildren(refptr<Node> other);
|
void addChildren(refptr<Node> other);
|
||||||
std::vector< refptr<Node> > & getChildren() { return m_children; }
|
std::vector< refptr<Node> > & getChildren() { return m_children; }
|
||||||
|
|
||||||
|
virtual unsigned long getInteger() { return 0ul; }
|
||||||
virtual std::string getString() { return ""; }
|
virtual std::string getString() { return ""; }
|
||||||
|
|
||||||
protected:
|
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
|
class StringNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StringNode(const std::string & str) { m_string = str; }
|
StringNode(const std::string & str) { m_string = str; }
|
||||||
std::string getString()
|
std::string getString() { return m_string; }
|
||||||
{
|
|
||||||
return m_string;
|
|
||||||
}
|
|
||||||
protected:
|
protected:
|
||||||
std::string m_string;
|
std::string m_string;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user