- ///
- explicit XMLStream(odocstream & os): os_(os), escape_(ESCAPE_ALL) {}
- ///
- odocstream & os() { return os_; }
- ///
- // int & tab() { return tab_; }
- /// closes any font tags that are eligible to be closed,
- /// i.e., last on the tag_stack_.
- /// \return false if there are open font tags we could not close.
- /// because they are "blocked" by open non-font tags on the stack.
- bool closeFontTags();
- /// sets a mark so we know what tags to close at the end.
- /// normally called at the start of a paragraph.
- void startDivision(bool keep_empty);
- /// clears the mark set by previous method.
- /// there should not be any other tags open before it on the stack,
- /// but if there are, we will close them.
- void endDivision();
- ///
- XMLStream & operator<<(docstring const &);
- ///
- XMLStream & operator<<(const char *);
- ///
- XMLStream & operator<<(char_type);
- ///
- XMLStream & operator<<(int);
- ///
- XMLStream & operator<<(char);
- ///
- XMLStream & operator<<(xml::StartTag const &);
- ///
- XMLStream & operator<<(xml::EndTag const &);
- ///
- XMLStream & operator<<(xml::CompTag const &);
- ///
- XMLStream & operator<<(xml::ParTag const &);
- ///
- XMLStream & operator<<(xml::FontTag const &);
- ///
- XMLStream & operator<<(xml::CR const &);
- ///
- enum EscapeSettings {
- ESCAPE_NONE,
- ESCAPE_AND, // meaning &
- ESCAPE_ALL // meaning <, >, &, at present
- };
- /// Sets what we are going to escape on the NEXT write.
- /// Everything is reset for the next time.
- XMLStream & operator<<(EscapeSettings);
- /// This routine is for debugging the tag stack, etc. Code
- /// for it is disabled by default, however, so you will need
- /// to enable it if you want to use it.
- void dumpTagStack(std::string const & msg);
- ///
- bool isTagOpen(xml::StartTag const &, int maxdepth = -1) const;
- ///
- bool isTagOpen(xml::EndTag const &, int maxdepth = -1) const;
- ///
- bool isTagPending(xml::StartTag const &, int maxdepth = -1) const;
+ ///
+ explicit XMLStream(odocstream & os): os_(os), escape_(ESCAPE_ALL) {}
+ ///
+ odocstream & os() { return os_; }
+ ///
+ // int & tab() { return tab_; }
+ /// closes any font tags that are eligible to be closed,
+ /// i.e., last on the tag_stack_.
+ /// \return false if there are open font tags we could not close.
+ /// because they are "blocked" by open non-font tags on the stack.
+ bool closeFontTags();
+ /// sets a mark so we know what tags to close at the end.
+ /// normally called at the start of a paragraph.
+ void startDivision(bool keep_empty);
+ /// clears the mark set by previous method.
+ /// there should not be any other tags open before it on the stack,
+ /// but if there are, we will close them.
+ void endDivision();
+ ///
+ XMLStream & operator<<(docstring const &);
+ ///
+ XMLStream & operator<<(const char *);
+ ///
+ XMLStream & operator<<(char_type);
+ ///
+ XMLStream & operator<<(int);
+ ///
+ XMLStream & operator<<(char);
+ ///
+ XMLStream & operator<<(xml::StartTag const &);
+ ///
+ XMLStream & operator<<(xml::EndTag const &);
+ ///
+ XMLStream & operator<<(xml::CompTag const &);
+ ///
+ XMLStream & operator<<(xml::ParTag const &);
+ ///
+ XMLStream & operator<<(xml::FontTag const &);
+ ///
+ XMLStream & operator<<(xml::CR const &);
+ ///
+ enum EscapeSettings {
+ ESCAPE_NONE,
+ ESCAPE_AND, // meaning &
+ ESCAPE_ALL // meaning <, >, &, at present
+ };
+ /// Sets what we are going to escape on the NEXT write.
+ /// Everything is reset for the next time.
+ XMLStream & operator<<(EscapeSettings);
+ /// This routine is for debugging the tag stack, etc. Code
+ /// for it is disabled by default, however, so you will need
+ /// to enable it if you want to use it.
+ void dumpTagStack(std::string const & msg);
+ ///
+ bool isTagOpen(xml::StartTag const &, int maxdepth = -1) const;
+ ///
+ bool isTagOpen(xml::EndTag const &, int maxdepth = -1) const;
+ ///
+ bool isTagPending(xml::StartTag const &, int maxdepth = -1) const;