Provide for the possibility of deferred material, per Andre's excellent

suggestion. Now I wish I'd done XHTMLStream the same way....


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32691 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-12-31 15:52:57 +00:00
parent bb80bd78f9
commit 98e6886dc4
2 changed files with 27 additions and 0 deletions

View File

@ -305,12 +305,31 @@ void MathStream::cr()
}
void MathStream::defer(docstring const & s)
{
deferred_ << s;
}
void MathStream::defer(string const & s)
{
deferred_ << from_utf8(s);
}
docstring MathStream::deferred() const
{
return deferred_.str();
}
MathStream & operator<<(MathStream & ms, docstring const & s)
{
ms.os() << s;
return ms;
}
//////////////////////////////////////////////////////////////////////

View File

@ -256,6 +256,12 @@ public:
int & tab() { return tab_; }
///
friend MathStream & operator<<(MathStream &, char const *);
///
void defer(docstring const &);
///
void defer(std::string const &);
///
docstring deferred() const;
private:
///
odocstream & os_;
@ -265,6 +271,8 @@ private:
int line_;
///
char lastchar_;
///
odocstringstream deferred_;
};
///