cmDocumentationSection.cxx 744 Bytes
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
3 4
#include "cmDocumentationSection.h"

5
void cmDocumentationSection::Append(const char* data[][2])
6 7
{
  int i = 0;
8
  while (data[i][1]) {
9
    this->Entries.emplace_back(data[i][0], data[i][1]);
10
    data += 1;
11
  }
12 13
}

14
void cmDocumentationSection::Prepend(const char* data[][2])
15 16 17
{
  std::vector<cmDocumentationEntry> tmp;
  int i = 0;
18
  while (data[i][1]) {
19
    tmp.emplace_back(data[i][0], data[i][1]);
20
    data += 1;
21 22
  }
  this->Entries.insert(this->Entries.begin(), tmp.begin(), tmp.end());
23 24
}

25
void cmDocumentationSection::Append(const char* n, const char* b)
26
{
27
  this->Entries.emplace_back(n, b);
28
}