Go to the documentation of this file.Go to the SVN repository for this file.
62 const string& between,
63 const string& after)
const
97 out << '>
'; // close 'element
' tag
99 PrintASNNewLine(out, indent) << "<xs:annotation><xs:documentation>";
100 ITERATE ( TComments, i, m_Comments ) {
103 PrintASNNewLine(out, indent) << "</xs:documentation></xs:annotation>";
106 PrintASNNewLine(out, indent) << "<xs:annotation><xs:documentation>";
107 out << NStr::TruncateSpaces(m_Comments.front());
108 out << "</xs:documentation></xs:annotation>";
111 PrintASNNewLine(out, indent) << "<xs:annotation><xs:documentation>";
112 ITERATE ( TComments, i, m_Comments ) {
115 PrintASNNewLine(out, indent) << "</xs:documentation></xs:annotation>";
121 CNcbiOstream& CComments::PrintDTD(CNcbiOstream& out, int flags) const
123 if ( Empty() ) // no comments
126 if ( !(flags & eDoNotWriteBlankLine) ) {
127 // prepend comments by empty line to separate from previous comments
135 if ( !(flags & eAlwaysMultiline) && OneLine() ) {
137 out << m_Comments.front() << ' ';
140 // multiline comments
142 ITERATE ( TComments, i, m_Comments ) {
150 if ( !(flags & eNoEOL) )
156 CNcbiOstream& CComments::PrintASN(CNcbiOstream& out,
157 int indent, int flags) const
159 if ( Empty() ) // no comments
162 bool newLine = (flags & eDoNotWriteBlankLine) == 0;
163 // prepend comments by empty line to separate from previous comments
165 ITERATE ( TComments, i, m_Comments ) {
167 PrintASNNewLine(out, indent);
168 out << "--" << NStr::Replace(*i, "--", "");
172 if ( (flags & eNoEOL) == 0 )
173 PrintASNNewLine(out, indent);
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Useful/utility classes and methods.