class TokenStreamReader {
public:
- TokenStreamReader(std::istream &);
+ explicit TokenStreamReader(std::istream &);
bool HasMore();
const Token &Next();
void ReadNumber(int &);
void ReadNumber(unsigned long &);
void ReadString(std::string &);
+ // like ReadString, but does not require the value to be
+ // written as a string literal in source
+ void ReadRelaxedString(std::string &);
void ReadVec(glm::vec2 &);
void ReadVec(glm::vec3 &);
// the Get* functions advance to the next token
// the As* functions try to cast the current token
// if the value could not be converted, a std::runtime_error is thrown
+ // conversion to string is always possible
bool GetBool();
bool AsBool() const;
int AsInt() const;
unsigned long GetULong();
unsigned long AsULong() const;
+ const std::string &GetString();
+ const std::string &AsString() const;
private:
void SkipComments();