diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/slice2docbook/Gen.cpp | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp index 1a25859ed05..4402831102c 100644 --- a/cpp/src/slice2docbook/Gen.cpp +++ b/cpp/src/slice2docbook/Gen.cpp @@ -47,10 +47,10 @@ Slice::Gen::generate(const Unit_ptr& unit) void Slice::Gen::visitUnitStart(const Unit_ptr& p) { - O << "<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">"; - printHeader(); - start("book"); +// O << "<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook V3.1//EN\">"; +// start("book"); + printHeader(); start("chapter", "Global Module"); start("section", "Overview"); visitContainer(p); @@ -59,7 +59,7 @@ Slice::Gen::visitUnitStart(const Unit_ptr& p) void Slice::Gen::visitUnitEnd(const Unit_ptr& p) { - end(); +// end(); } void @@ -504,15 +504,17 @@ void Slice::Gen::printHeader() { static const char* header = - "<!--\n" - "Copyright (c) 2001\n" - "MutableRealms, Inc.\n" - "Huntsville, AL, USA\n" - "\n" - "All Rights Reserved\n" - "\n" - "Generated by the `slice2docbook' converter\n" - "-->"; +"<!--\n" +"**********************************************************************\n" +"Copyright (c) 2001\n" +"MutableRealms, Inc.\n" +"Huntsville, AL, USA\n" +"\n" +"All Rights Reserved\n" +"\n" +"Generated by the `slice2docbook' converter\n" +"**********************************************************************\n" +"-->"; O.zeroIndent(); O << nl << header; @@ -655,17 +657,15 @@ Slice::Gen::printComment(const Contained_ptr& p) { start("section", "See Also"); start("para"); - start("itemizedlist"); + start("simplelist type=\"inline\""); for(StringList::iterator p = see.begin(); p != see.end(); ++p) { - start("listitem"); - start("para"); + start("member"); O << nl << *p; end(); - end(); } end(); @@ -694,17 +694,20 @@ Slice::Gen::printSummary(const Contained_ptr& p) void Slice::Gen::start(const std::string& element) { - elementStack_.push(element); O << nl << '<' << element << '>'; O.inc(); + + string::size_type pos = element.find_first_of(" \t"); + if(pos == string::npos) + elementStack_.push(element); + else + elementStack_.push(element.substr(0, pos)); } void Slice::Gen::start(const std::string& element, const std::string& title) { - elementStack_.push(element); - O << nl << '<' << element << '>'; - O.inc(); + start(element); start("title"); O << nl << title; end(); @@ -715,6 +718,7 @@ Slice::Gen::end() { string element = elementStack_.top(); elementStack_.pop(); + O.dec(); O << nl << "</" << element << '>'; } |