Add label summary times to ctest default output. Also, remove parallel time output...
[cmake.git] / Source / cmDocumentationSection.h
blobd0c3fa9beb36698cd7e73b87f282a4777d41a35d
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmDocumentationSection.h,v $
5 Language: C++
6 Date: $Date: 2007-10-24 15:36:47 $
7 Version: $Revision: 1.3 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef _cmDocumentationSection_h
18 #define _cmDocumentationSection_h
20 #include "cmStandardIncludes.h"
21 #include "cmDocumentationFormatter.h"
23 // Low-level interface for custom documents:
24 /** Internal class representing a section of the documentation.
25 * Cares e.g. for the different section titles in the different
26 * output formats.
28 class cmDocumentationSection
30 public:
31 /** Create a cmSection, with a special name for man-output mode. */
32 cmDocumentationSection(const char* name, const char* manName)
33 :Name(name), ManName(manName) {}
35 /** Has any content been added to this section or is it empty ? */
36 bool IsEmpty() const { return this->Entries.empty(); }
38 /** Clear contents. */
39 void Clear() { this->Entries.clear(); }
41 /** Return the name of this section for the given output form. */
42 const char* GetName(cmDocumentationEnums::Form form) const
43 { return (form==cmDocumentationEnums::ManForm ?
44 this->ManName.c_str() : this->Name.c_str()); }
46 /** Return a pointer to the first entry of this section. */
47 const std::vector<cmDocumentationEntry> &GetEntries() const
48 { return this->Entries; }
50 /** Append an entry to this section. */
51 void Append(const cmDocumentationEntry& entry)
52 { this->Entries.push_back(entry); }
53 void Append(const std::vector<cmDocumentationEntry> &entries)
54 { this->Entries.insert(this->Entries.end(),entries.begin(),entries.end()); }
56 /** Append an entry to this section using NULL terminated chars */
57 void Append(const char *[][3]);
58 void Append(const char *n, const char *b, const char *f);
60 /** prepend some documentation to this section */
61 void Prepend(const char *[][3]);
62 void Prepend(const std::vector<cmDocumentationEntry> &entries)
63 { this->Entries.insert(this->Entries.begin(),
64 entries.begin(),entries.end()); }
67 private:
68 std::string Name;
69 std::string ManName;
70 std::vector<cmDocumentationEntry> Entries;
73 #endif