RigsofRods
Soft-body Physics Simulation
GenericDocContextClass.h
Go to the documentation of this file.
1 namespace Script2Game {
2 
12 {
20 };
21 
26 {
27  // PLEASE maintain the same order as in 'GenericFileFormat.h' and 'GenericFileFormatAngelscript.cpp'
28 
30 
31  bool moveNext();
32  uint getPos();
33  bool seekNextLine();
34  int countLineArgs();
35  bool endOfFile(int offset = 0);
36  TokenType tokenType(int offset = 0);
37 
38  string getTokString(int offset = 0);
39  float getTokFloat(int offset = 0);
40  bool gettokBool(int offset = 0);
41  string getTokKeyword(int offset = 0);
42  string getTokComment(int offset = 0);
43 
44  bool isTokString(int offset = 0);
45  bool isTokFloat(int offset = 0);
46  bool isTokBool(int offset = 0);
47  bool isTokKeyword(int offset = 0);
48  bool isTokComment(int offset = 0);
49 
50  // Editing functions:
51 
52  bool insertToken(int offset = 0);
53  bool eraseToken(int offset = 0);
54 
55  bool setTokString(int offset, const string&in str);
56  bool setTokFloat(int offset, float val);
57  bool setTokBool(int offset, bool val);
58  bool setTokKeyword(int offset, const string&in str);
59  bool setTokComment(int offset, const string&in str);
60  bool setTokLineBreak(int offset);
61 };
62 
65 
66 } //namespace Script2Game
Script2Game::TOKEN_TYPE_NUMBER
@ TOKEN_TYPE_NUMBER
Definition: GenericDocContextClass.h:17
Script2Game::TOKEN_TYPE_NONE
@ TOKEN_TYPE_NONE
Definition: GenericDocContextClass.h:13
Script2Game::GenericDocContextClass::setTokBool
bool setTokBool(int offset, bool val)
RoR::GenericDocumentPtr
RefCountingObjectPtr< GenericDocument > GenericDocumentPtr
Definition: GenericFileFormat.h:88
Script2Game::GenericDocContextClass::isTokFloat
bool isTokFloat(int offset=0)
Script2Game::TOKEN_TYPE_BOOL
@ TOKEN_TYPE_BOOL
Definition: GenericDocContextClass.h:18
Script2Game
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
Definition: BeamClass.h:2
Script2Game::GenericDocContextClass::setTokLineBreak
bool setTokLineBreak(int offset)
Script2Game::GenericDocContextClass::moveNext
bool moveNext()
Script2Game::GenericDocContextClass
Binding of RoR::GenericDocContext; Traverses document tokens; See 'demo_script.as' for an example.
Definition: GenericDocContextClass.h:25
Script2Game::GenericDocContextClass::isTokComment
bool isTokComment(int offset=0)
Script2Game::GenericDocContextClass::setTokComment
bool setTokComment(int offset, const string &in str)
Script2Game::GenericDocContextClass::gettokBool
bool gettokBool(int offset=0)
Script2Game::GenericDocContextClass::getTokComment
string getTokComment(int offset=0)
Script2Game::TOKEN_TYPE_STRING
@ TOKEN_TYPE_STRING
Definition: GenericDocContextClass.h:16
Script2Game::GenericDocContextClass::insertToken
bool insertToken(int offset=0)
Inserts TokenType::NONE;.
Script2Game::GenericDocContextClass::getTokFloat
float getTokFloat(int offset=0)
Script2Game::TOKEN_TYPE_LINEBREAK
@ TOKEN_TYPE_LINEBREAK
Definition: GenericDocContextClass.h:14
Script2Game::TOKEN_TYPE_COMMENT
@ TOKEN_TYPE_COMMENT
Definition: GenericDocContextClass.h:15
Script2Game::GenericDocContextClass::setTokString
bool setTokString(int offset, const string &in str)
Script2Game::GenericDocContextClass::eraseToken
bool eraseToken(int offset=0)
Script2Game::GenericDocContextClass::tokenType
TokenType tokenType(int offset=0)
Script2Game::GenericDocContextClass::seekNextLine
bool seekNextLine()
Script2Game::GenericDocContextClass::isTokBool
bool isTokBool(int offset=0)
Script2Game::TOKEN_TYPE_KEYWORD
@ TOKEN_TYPE_KEYWORD
Definition: GenericDocContextClass.h:19
Script2Game::TokenType
TokenType
Definition: GenericDocContextClass.h:11
Script2Game::GenericDocContextClass::endOfFile
bool endOfFile(int offset=0)
Script2Game::GenericDocContextClass::isTokString
bool isTokString(int offset=0)
Script2Game::GenericDocContextClass::getTokKeyword
string getTokKeyword(int offset=0)
Script2Game::GenericDocContextClass::isTokKeyword
bool isTokKeyword(int offset=0)
Script2Game::GenericDocContextClass::getTokString
string getTokString(int offset=0)
Script2Game::GenericDocContextClass::setTokFloat
bool setTokFloat(int offset, float val)
Script2Game::GenericDocContextClass::setTokKeyword
bool setTokKeyword(int offset, const string &in str)
Script2Game::GenericDocContextClass::getPos
uint getPos()
Script2Game::GenericDocContextClass::countLineArgs
int countLineArgs()
Script2Game::GenericDocContextClass::GenericDocContext
GenericDocContext(GenericDocumentPtr@ d)