COMP: fix build with msvc 6, the enums are now part of a class which is

already completely parsed

Alex
This commit is contained in:
Alexander Neundorf 2007-07-02 11:24:44 -04:00
parent 55fa3825c0
commit 611f86b7f6

View File

@ -19,8 +19,29 @@
#include "cmStandardIncludes.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
cmDocumentation, but then MSVC6 complains in RequestedHelpItem that
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. */
enum Type
{ None, Usage, Single, SingleModule, SingleProperty,
List, ModuleList, PropertyList,
Full, Properties, Modules, Commands, CompatCommands,
Copyright, Version };
/** Forms of documentation output. */
enum Form { TextForm, HTMLForm, ManForm, UsageForm };
};
/** Class to generate documentation. */ /** Class to generate documentation. */
class cmDocumentation class cmDocumentation: public cmDocumentationEnums
{ {
public: public:
cmDocumentation(); cmDocumentation();
@ -28,12 +49,6 @@ public:
~cmDocumentation(); ~cmDocumentation();
// High-level interface for standard documents: // High-level interface for standard documents:
/** Types of help provided. */
enum Type { None, Usage, Single, SingleModule, SingleProperty,
List, ModuleList, PropertyList,
Full, Properties, Modules, Commands, CompatCommands,
Copyright, Version };
/** /**
* Check command line arguments for documentation options. Returns * Check command line arguments for documentation options. Returns
* true if documentation options are found, and false otherwise. * true if documentation options are found, and false otherwise.
@ -85,11 +100,6 @@ public:
void SetSeeAlsoList(const cmDocumentationEntry*); void SetSeeAlsoList(const cmDocumentationEntry*);
// Low-level interface for custom documents: // Low-level interface for custom documents:
/** Forms of documentation output. */
enum Form { TextForm, HTMLForm, ManForm, UsageForm };
/** Internal class representing a section of the documentation. /** Internal class representing a section of the documentation.
* Cares e.g. for the different section titles in the different * Cares e.g. for the different section titles in the different
* output formats. * output formats.
@ -131,7 +141,6 @@ public:
std::string ManName; std::string ManName;
std::vector<cmDocumentationEntry> Entries; std::vector<cmDocumentationEntry> Entries;
static const cmDocumentationEntry EmptySection; static const cmDocumentationEntry EmptySection;
}; };
/** /**
@ -254,8 +263,8 @@ private:
struct RequestedHelpItem struct RequestedHelpItem
{ {
RequestedHelpItem():Form(TextForm), Type(None) {} RequestedHelpItem():Form(TextForm), Type(None) {}
cmDocumentation::Form Form; cmDocumentationEnums::Form Form;
cmDocumentation::Type Type; cmDocumentationEnums::Type Type;
std::string Filename; std::string Filename;
std::string Argument; std::string Argument;
}; };