diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-10-22 16:49:09 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-10-22 16:49:09 (GMT) |
commit | 6cdf03250568c2150094cddfb6542945903b41a1 (patch) | |
tree | d2180686ef12105d6855203eded0505775b507ab /Source/cmDocumentationFormatterMan.cxx | |
parent | cfb84d8562646662cfee9622f657e8eacdd49f8c (diff) | |
download | CMake-6cdf03250568c2150094cddfb6542945903b41a1.zip CMake-6cdf03250568c2150094cddfb6542945903b41a1.tar.gz CMake-6cdf03250568c2150094cddfb6542945903b41a1.tar.bz2 |
ENH: change to make the documentation class more generic, about halfway there, also provides secitons for Variables now
Diffstat (limited to 'Source/cmDocumentationFormatterMan.cxx')
-rw-r--r-- | Source/cmDocumentationFormatterMan.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Source/cmDocumentationFormatterMan.cxx b/Source/cmDocumentationFormatterMan.cxx index 0a16b9f..d34a0d4 100644 --- a/Source/cmDocumentationFormatterMan.cxx +++ b/Source/cmDocumentationFormatterMan.cxx @@ -16,6 +16,7 @@ =========================================================================*/ #include "cmDocumentationFormatterMan.h" +#include "cmDocumentationSection.h" #include "cmSystemTools.h" #include "cmVersion.h" @@ -26,28 +27,32 @@ cmDocumentationFormatterMan::cmDocumentationFormatterMan() { } -void cmDocumentationFormatterMan::PrintSection(std::ostream& os, - const cmDocumentationEntry* section, - const char* name) +void cmDocumentationFormatterMan +::PrintSection(std::ostream& os, + const cmDocumentationSection §ion, + const char* name) { if(name) { os << ".SH " << name << "\n"; } - if(!section) { return; } - for(const cmDocumentationEntry* op = section; op->brief; ++op) + + const std::vector<cmDocumentationEntry> &entries = + section.GetEntries(); + for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin(); + op != entries.end(); ++op) { - if(op->name) + if(op->Name.size()) { os << ".TP\n" - << ".B " << (op->name[0]?op->name:"*") << "\n"; - this->PrintFormatted(os, op->brief); - this->PrintFormatted(os, op->full); + << ".B " << (op->Name.size()?op->Name.c_str():"*") << "\n"; + this->PrintFormatted(os, op->Brief.c_str()); + this->PrintFormatted(os, op->Full.c_str()); } else { os << ".PP\n"; - this->PrintFormatted(os, op->brief); + this->PrintFormatted(os, op->Brief.c_str()); } } } |