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

further WIP on launcher

This commit is contained in:
milek7
2019-08-24 01:28:55 +02:00
parent ad58c617d4
commit aa9bee57da
20 changed files with 225 additions and 94 deletions

View File

@@ -324,6 +324,17 @@ bool cParser::trimComments(std::string &String)
return false;
}
void cParser::injectString(const std::string &str)
{
if (mIncludeParser) {
mIncludeParser->injectString(str);
}
else {
mIncludeParser = std::make_shared<cParser>( str, buffer_TEXT, "", LoadTraction );
mIncludeParser->autoclear( m_autoclear );
}
}
int cParser::getProgress() const
{
return static_cast<int>( mStream->rdbuf()->pubseekoff(0, std::ios_base::cur) * 100 / mSize );
@@ -374,3 +385,7 @@ cParser::Line() const {
if( mIncludeParser ) { return mIncludeParser->Line(); }
else { return mLine; }
}
int cParser::LineMain() const {
return mIncludeParser ? -1 : mLine;
}