1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmDocumentationSection.cxx,v $
6 Date: $Date: 2007/10/22 19:33:19 $
7 Version: $Revision: 1.2 $
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 #include "cmDocumentationSection.h"
20 //----------------------------------------------------------------------------
21 void cmDocumentationSection::Append(const char *data
[][3])
26 this->Entries
.push_back(cmDocumentationEntry(data
[i
][0],
33 //----------------------------------------------------------------------------
34 void cmDocumentationSection::Prepend(const char *data
[][3])
36 std::vector
<cmDocumentationEntry
> tmp
;
40 tmp
.push_back(cmDocumentationEntry(data
[i
][0],
45 this->Entries
.insert(this->Entries
.begin(),tmp
.begin(),tmp
.end());
48 //----------------------------------------------------------------------------
49 void cmDocumentationSection::Append(const char *n
, const char *b
,
52 this->Entries
.push_back(cmDocumentationEntry(n
,b
,f
));
56 //----------------------------------------------------------------------------
57 void cmDocumentationSection::Set(const cmDocumentationEntry
* header
,
58 const cmDocumentationEntry
* section
,
59 const cmDocumentationEntry
* footer
)
61 this->Entries
.erase(this->Entries
.begin(), this->Entries
.end());
64 for(const cmDocumentationEntry
* op
= header
; op
->brief
; ++op
)
66 this->Entries
.push_back(*op
);
71 for(const cmDocumentationEntry
* op
= section
; op
->brief
; ++op
)
73 this->Entries
.push_back(*op
);
78 for(const cmDocumentationEntry
* op
= footer
; op
->brief
; ++op
)
80 this->Entries
.push_back(*op
);
83 cmDocumentationEntry empty
= {0,0,0};
84 this->Entries
.push_back(empty
);