Files
CMake/Source/cmDocumentationEntry.h
Alex Turbov 74b735dea8 cmDocumentation: char*[][2]cmDocumentationEntry[N]
Use fixed size arrays of `cmDocumentationEntry` items instead of
open arrays of two `char` pointers when describe program options
help screens.

Also, drop `const char*[][2]` overloads of methods of
`cmDocumentation` and `cmDocumentationSection` classes in the sake
of generic (template) appenders introduced earlier.
2022-11-17 16:37:11 +04:00

26 lines
596 B
C++

/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#pragma once
#include "cmConfigure.h" // IWYU pragma: keep
#include <string>
/** Standard documentation entry for cmDocumentation's formatting. */
struct cmDocumentationEntry
{
std::string Name;
std::string Brief;
char CustomNamePrefix = ' ';
cmDocumentationEntry() = default;
cmDocumentationEntry(const char* const n, const char* const b)
{
if (n) {
this->Name = n;
}
if (b) {
this->Brief = b;
}
}
};