16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

minor refactoring and diagnostics enhancements, fixed some memory leaks, radiostop test command

This commit is contained in:
tmj-fstate
2017-08-30 19:54:43 +02:00
parent decbcd8055
commit e5980f946c
27 changed files with 1584 additions and 1617 deletions

View File

@@ -78,7 +78,9 @@ class cParser //: public std::stringstream
// add custom definition of text which should be ignored when retrieving tokens
void addCommentStyle( std::string const &Commentstart, std::string const &Commentend );
// returns name of currently open file, or empty string for text type stream
std::string Name();
std::string Name() const;
// returns number of currently processed line
std::size_t Line() const;
private:
// methods:
@@ -90,13 +92,14 @@ class cParser //: public std::stringstream
std::size_t count();
// members:
bool LoadTraction; // load traction?
std::istream *mStream; // relevant kind of buffer is attached on creation.
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; // size of open stream, for progress report.
std::streamoff mSize { 0 }; // size of open stream, for progress report.
std::size_t mLine { 0 }; // currently processed line
typedef std::map<std::string, std::string> commentmap;
commentmap mComments;
cParser *mIncludeParser; // child class to handle include directives.
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;
};