1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
13 #include "cmDocumentationFormatterUsage.h"
14 #include "cmDocumentationSection.h"
16 cmDocumentationFormatterUsage::cmDocumentationFormatterUsage()
17 :cmDocumentationFormatterText()
21 void cmDocumentationFormatterUsage
22 ::PrintSection(std::ostream& os,
23 const cmDocumentationSection §ion,
31 const std::vector<cmDocumentationEntry> &entries =
33 for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin();
34 op != entries.end(); ++op)
38 os << " " << op->Name;
39 this->TextIndent = " ";
40 int align = static_cast<int>(strlen(this->TextIndent))-4;
41 for(int i = static_cast<int>(op->Name.size()); i < align; ++i)
45 if (op->Name.size() > strlen(this->TextIndent)-4 )
48 os.write(this->TextIndent, strlen(this->TextIndent)-2);
51 this->PrintColumn(os, op->Brief.c_str());
57 this->TextIndent = "";
58 this->PrintFormatted(os, op->Brief.c_str());