Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
GenericDocContextClass.h
Go to the documentation of this file.
1namespace Script2Game {
2
15{
16 // PLEASE maintain the same order as in 'GenericFileFormat.h' and 'GenericFileFormatAngelscript.cpp'
17
18 GenericDocContext(GenericDocumentPtr@ d);
19
20 bool moveNext();
21 uint getPos();
24 bool endOfFile(int offset = 0);
25 TokenType tokenType(int offset = 0);
26
27 string getTokString(int offset = 0);
28 float getTokFloat(int offset = 0);
29 float getTokInt(int offset = 0);
30 bool gettokBool(int offset = 0);
31 string getTokKeyword(int offset = 0);
32 string getTokComment(int offset = 0);
33
34 bool isTokString(int offset = 0);
35 bool isTokFloat(int offset = 0);
36 bool isTokInt(int offset = 0);
37 bool isTokBool(int offset = 0);
38 bool isTokKeyword(int offset = 0);
39 bool isTokComment(int offset = 0);
40 bool isTokLineBreak(int offset = 0);
41
42 // Editing functions:
43
44 void appendTokens(int count);
45 bool insertToken(int offset = 0);
46 bool eraseToken(int offset = 0);
47
48 void appendTokString(const string&in str);
49 void appendTokFloat(float val);
50 void appendTokInt(float val);
51 void appendTokBool(bool val);
52 void appendTokKeyword(const string&in str);
53 void appendTokComment(const string&in str);
55
56 bool setTokString(int offset, const string&in str);
57 bool setTokFloat(int offset, float val);
58 bool setTokInt(int offset, int val);
59 bool setTokBool(int offset, bool val);
60 bool setTokKeyword(int offset, const string&in str);
61 bool setTokComment(int offset, const string&in str);
62 bool setTokLineBreak(int offset);
63};
64
67
68} //namespace Script2Game
Binding of RoR::GenericDocContext; Traverses document tokens; See 'demo_script.as' for an example.
bool setTokComment(int offset, const string &in str)
bool insertToken(int offset=0)
Inserts TokenType::NONE;.
void appendTokKeyword(const string &in str)
GenericDocContext(GenericDocumentPtr@ d)
string getTokString(int offset=0)
bool setTokFloat(int offset, float val)
void appendTokens(int count)
Appends a series of TokenType::NONE and sets Pos at the first one added; use setTok* functions to fil...
bool setTokInt(int offset, int val)
string getTokKeyword(int offset=0)
void appendTokComment(const string &in str)
bool setTokKeyword(int offset, const string &in str)
void appendTokString(const string &in str)
bool setTokString(int offset, const string &in str)
TokenType tokenType(int offset=0)
bool setTokBool(int offset, bool val)
string getTokComment(int offset=0)
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
TokenType
Binding of RoR::TokenType, for use with Script2Game::GenericDocContextClass.
Definition TokenType.h:20