86 virtual bool saveToResource(std::string resource_name, std::string resource_group_name);
94 if (
doc ==
nullptr && AngelScript::asGetActiveContext() !=
nullptr)
96 AngelScript::asGetActiveContext()->SetException(
"Cannot create GenericDocContextClass from null GenericDocument!");
Central state/object manager and communications hub.
#define ROR_ASSERT(_EXPR)
Self reference-counting objects, as requred by AngelScript garbage collector.
void appendTokens(int count)
Appends a series of TokenType::NONE and sets Pos at the first one added; use setTok* functions to fil...
float getTokNumeric(int offset=0) const
bool setTokLineBreak(int offset)
bool isTokBool(int offset=0) const
void appendTokLineBreak()
void appendTokInt(int val)
bool getTokBool(int offset=0) const
bool setFloatData(int offset, TokenType type, float data)
virtual ~GenericDocContext()
bool isTokKeyword(int offset=0) const
std::string getTokKeyword(int offset=0) const
bool setStringData(int offset, TokenType type, const std::string &data)
void appendTokBool(bool val)
void appendTokKeyword(const std::string &str)
float getTokFloat(int offset=0) const
bool setTokKeyword(int offset, const std::string &str)
bool isTokNumeric(int offset=0) const
GenericDocContext(GenericDocumentPtr d)
bool insertToken(int offset=0)
Inserts TokenType::NONE;.
bool setTokInt(int offset, int val)
void appendTokFloat(float val)
bool setTokComment(int offset, const std::string &str)
bool eraseToken(int offset=0)
bool endOfFile(int offset=0) const
bool isTokLineBreak(int offset=0) const
std::string getTokString(int offset=0) const
bool isTokComment(int offset=0) const
bool isTokString(int offset=0) const
bool setTokBool(int offset, bool val)
bool isTokInt(int offset=0) const
int getTokInt(int offset=0) const
float getFloatData(int offset=0) const
bool isTokFloat(int offset=0) const
void appendTokString(const std::string &str)
bool setTokString(int offset, const std::string &str)
std::string getTokComment(int offset=0) const
void appendTokComment(const std::string &str)
const char * getStringData(int offset=0) const
TokenType tokenType(int offset=0) const
bool setTokFloat(int offset, float val)
static const BitMask_t OPTION_ALLOW_SLASH_COMMENTS
Allow comments starting with //.
std::vector< char > string_pool
static const BitMask_t OPTION_ALLOW_SEPARATOR_COLON
Allow ':' as separator between tokens.
virtual bool saveToResource(std::string resource_name, std::string resource_group_name)
virtual void loadFromDataStream(Ogre::DataStreamPtr datastream, BitMask_t options=0)
virtual void saveToDataStream(Ogre::DataStreamPtr datastream)
virtual bool loadFromResource(std::string resource_name, std::string resource_group_name, BitMask_t options=0)
static const BitMask_t OPTION_FIRST_LINE_IS_TITLE
First non-empty & non-comment line is a naked string with spaces.
static const BitMask_t OPTION_ALLOW_NAKED_STRINGS
Allow strings without quotes, for backwards compatibility.
static const BitMask_t OPTION_ALLOW_SEPARATOR_EQUALS
Allow '=' as separator between tokens.
std::vector< Token > tokens
virtual ~GenericDocument()
static const BitMask_t OPTION_ALLOW_HASH_COMMENTS
Allow comments starting with #.
static const BitMask_t OPTION_ALLOW_BRACED_KEYWORDS
Allow INI-like '[keyword]' tokens.
static const BitMask_t OPTION_PARENTHESES_CAPTURE_SPACES
If non-empty NAKED string encounters '(', following spaces will be captured until matching ')' is fou...