16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 11:19:19 +02:00

build 180809. scenery node groups, AI shunt mode braking tweaks

This commit is contained in:
tmj-fstate
2018-08-09 22:24:42 +02:00
parent 249e01375b
commit cbaa5f7817
13 changed files with 398 additions and 75 deletions

View File

@@ -47,11 +47,6 @@ class cParser //: public std::stringstream
ignoreToken() {
readToken(); };
inline
void
ignoreTokens(int count) {
for( int i = 0; i < count; ++i ) {
readToken(); } };
inline
bool
expectToken( std::string const &Value ) {
return readToken() == Value; };
@@ -97,14 +92,17 @@ class cParser //: public std::stringstream
std::size_t count();
// members:
bool m_autoclear { true }; // not retrieved tokens are discarded when another read command is issued (legacy behaviour)
bool LoadTraction; // load traction?
bool LoadTraction { true }; // load traction?
std::shared_ptr<std::istream> mStream; // relevant kind of buffer is attached on creation.
std::string mFile; // name of the open file, if any
std::string mPath; // path to open stream, for relative path lookups.
std::streamoff mSize { 0 }; // size of open stream, for progress report.
std::size_t mLine { 0 }; // currently processed line
bool mIncFile { false }; // the parser is processing an *.inc file
typedef std::map<std::string, std::string> commentmap;
commentmap mComments;
commentmap mComments {
commentmap::value_type( "/*", "*/" ),
commentmap::value_type( "//", "\n" ) };
std::shared_ptr<cParser> mIncludeParser; // child class to handle include directives.
std::vector<std::string> parameters; // parameter list for included file.
std::deque<std::string> tokens;