2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2007-09-19 17:05:28 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2007-09-19 17:05:28 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2007-09-19 17:05:28 +04:00
|
|
|
#ifndef _cmDocumentationFormatter_h
|
|
|
|
#define _cmDocumentationFormatter_h
|
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
|
|
|
|
/** This is just a helper class to make it build with MSVC 6.0.
|
|
|
|
Actually the enums and internal classes could directly go into
|
2011-10-13 21:51:18 +04:00
|
|
|
cmDocumentation, but then MSVC6 complains in RequestedHelpItem that
|
2007-09-19 17:05:28 +04:00
|
|
|
cmDocumentation is an undefined type and so it doesn't know the enums.
|
|
|
|
Moving the enums to a class which is then already completely parsed helps
|
|
|
|
against this. */
|
|
|
|
class cmDocumentationEnums
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/** Types of help provided. */
|
2011-10-13 21:51:18 +04:00
|
|
|
enum Type
|
2013-09-16 19:29:06 +04:00
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
None,
|
|
|
|
Version,
|
|
|
|
Usage,
|
|
|
|
Help,
|
|
|
|
Full,
|
|
|
|
ListManuals,
|
|
|
|
ListCommands,
|
|
|
|
ListModules,
|
|
|
|
ListProperties,
|
|
|
|
ListVariables,
|
|
|
|
ListPolicies,
|
|
|
|
ListGenerators,
|
|
|
|
OneManual,
|
|
|
|
OneCommand,
|
|
|
|
OneModule,
|
|
|
|
OneProperty,
|
|
|
|
OneVariable,
|
|
|
|
OnePolicy,
|
2014-01-08 20:14:06 +04:00
|
|
|
OldCustomModules
|
2013-09-16 19:29:06 +04:00
|
|
|
};
|
2007-09-19 17:05:28 +04:00
|
|
|
};
|
|
|
|
|
2007-10-22 20:49:09 +04:00
|
|
|
class cmDocumentationSection;
|
|
|
|
|
2013-09-14 00:09:52 +04:00
|
|
|
/** Print documentation in a simple text format. */
|
2007-09-19 17:05:28 +04:00
|
|
|
class cmDocumentationFormatter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmDocumentationFormatter();
|
|
|
|
virtual ~cmDocumentationFormatter();
|
|
|
|
void PrintFormatted(std::ostream& os, const char* text);
|
|
|
|
|
|
|
|
virtual void PrintSection(std::ostream& os,
|
2013-09-14 00:09:52 +04:00
|
|
|
cmDocumentationSection const& section);
|
|
|
|
virtual void PrintPreformatted(std::ostream& os, const char* text);
|
|
|
|
virtual void PrintParagraph(std::ostream& os, const char* text);
|
|
|
|
void PrintColumn(std::ostream& os, const char* text);
|
|
|
|
void SetIndent(const char* indent);
|
2016-05-16 17:34:04 +03:00
|
|
|
|
2013-09-14 00:09:52 +04:00
|
|
|
private:
|
|
|
|
int TextWidth;
|
|
|
|
const char* TextIndent;
|
2007-09-19 17:05:28 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|