explicit Value(const std::string &identifier)
: literal(0), identifier(identifier), isLiteral(false) { }
explicit Value(Literal *literal)
- : literal(literal), isLiteral(false) { }
+ : literal(literal), isLiteral(true) { }
+
+public:
+ bool IsLiteral() const { return isLiteral; }
+ const Literal &GetLiteral() const;
+ const std::string &GetIdentifier() const;
private:
Literal *literal;
props[name] = value;
}
+ typedef std::map<std::string, Value *>::iterator Iterator;
+ typedef std::map<std::string, Value *>::const_iterator ConstIterator;
+ Iterator Begin() { return props.begin(); }
+ ConstIterator Begin() const { return props.begin(); }
+ Iterator End() { return props.end(); }
+ ConstIterator End() const { return props.end(); }
+
private:
std::map<std::string, Value *> props;