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 ============================================================================*/
12 #include "cmDocumentationSection.h"
15 //----------------------------------------------------------------------------
16 void cmDocumentationSection::Append(const char *data[][3])
21 this->Entries.push_back(cmDocumentationEntry(data[i][0],
28 //----------------------------------------------------------------------------
29 void cmDocumentationSection::Prepend(const char *data[][3])
31 std::vector<cmDocumentationEntry> tmp;
35 tmp.push_back(cmDocumentationEntry(data[i][0],
40 this->Entries.insert(this->Entries.begin(),tmp.begin(),tmp.end());
43 //----------------------------------------------------------------------------
44 void cmDocumentationSection::Append(const char *n, const char *b,
47 this->Entries.push_back(cmDocumentationEntry(n,b,f));
51 //----------------------------------------------------------------------------
52 void cmDocumentationSection::Set(const cmDocumentationEntry* header,
53 const cmDocumentationEntry* section,
54 const cmDocumentationEntry* footer)
56 this->Entries.erase(this->Entries.begin(), this->Entries.end());
59 for(const cmDocumentationEntry* op = header; op->brief; ++op)
61 this->Entries.push_back(*op);
66 for(const cmDocumentationEntry* op = section; op->brief; ++op)
68 this->Entries.push_back(*op);
73 for(const cmDocumentationEntry* op = footer; op->brief; ++op)
75 this->Entries.push_back(*op);
78 cmDocumentationEntry empty = {0,0,0};
79 this->Entries.push_back(empty);