X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftexstream.h;h=2cfcd16da40379e3d9ad40147e56bd232a9fa205;hb=3561caa3a171a5984ee7a10b7ea82f7f4b7226e8;hp=e5450ce7417a53a84b77672fcd69225d56c6b4ec;hpb=0aab06c4680c0cb800f0c5d4479f790e760d6433;p=lyx.git diff --git a/src/texstream.h b/src/texstream.h index e5450ce741..2cfcd16da4 100644 --- a/src/texstream.h +++ b/src/texstream.h @@ -81,7 +81,8 @@ public: /// explicit otexstream(odocstream & os) : otexrowstream(os), canbreakline_(false), - protectspace_(false), parbreak_(true), lastchar_(0) {} + protectspace_(false), terminate_command_(false), + parbreak_(true), lastchar_(0) {} /// void put(char_type const & c); /// @@ -95,6 +96,10 @@ public: /// bool protectSpace() const { return protectspace_; } /// + void terminateCommand(bool terminate) { terminate_command_ = terminate; } + /// + bool terminateCommand() const { return terminate_command_; } + /// void lastChar(char_type const & c) { parbreak_ = (!canbreakline_ && c == '\n'); @@ -111,6 +116,8 @@ private: /// bool protectspace_; /// + bool terminate_command_; + /// bool parbreak_; /// char_type lastchar_; @@ -144,14 +151,22 @@ struct SafeBreakLine { char n; }; +/// Helper structs for terminating a command +struct TerminateCommand { + char n; +}; + extern BreakLine breakln; extern SafeBreakLine safebreakln; +extern TerminateCommand termcmd; /// otexstream & operator<<(otexstream &, BreakLine); /// otexstream & operator<<(otexstream &, SafeBreakLine); /// +otexstream & operator<<(otexstream &, TerminateCommand); +/// otexstream & operator<<(otexstream &, odocstream_manip); /// otexstream & operator<<(otexstream &, TexString); @@ -168,6 +183,6 @@ template otexstream & operator<<(otexstream & ots, Type value); -} +} // namespace lyx #endif