X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Floader%2FParsedSource.h;h=6351ae43f90855b8786c57f2c2d23447817ef0bd;hb=ab772977707672896ec6ce7a23add2bdb044170a;hp=d5347e55c201d5e02a9492369acdc519ec6740cc;hpb=5d6b785e122093fe05e2ed14f688a8bce6bad6a9;p=l2e.git diff --git a/src/loader/ParsedSource.h b/src/loader/ParsedSource.h index d5347e5..6351ae4 100644 --- a/src/loader/ParsedSource.h +++ b/src/loader/ParsedSource.h @@ -78,7 +78,12 @@ public: 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; @@ -98,6 +103,13 @@ public: props[name] = value; } + typedef std::map::iterator Iterator; + typedef std::map::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 props;