CMake/Source/cmPropertyDefinition.h

71 lines
2.1 KiB
C
Raw Normal View History

/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
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.
============================================================================*/
#ifndef cmPropertyDefinition_h
#define cmPropertyDefinition_h
#include "cmProperty.h"
2012-02-28 17:05:54 +04:00
/** \class cmPropertyDefinition
* \brief Property meta-information
*
* This class contains the following meta-information about property:
* - Name;
* - Various documentation strings;
* - The scope of the property;
* - If the property is chained.
*/
class cmPropertyDefinition
{
public:
2012-02-28 17:05:54 +04:00
/// Define this property
void DefineProperty(const char *name, cmProperty::ScopeType scope,
const char *ShortDescription,
const char *FullDescription,
const char *DocumentationSection,
bool chained);
2012-02-28 17:05:54 +04:00
/// Get the documentation string
cmDocumentationEntry GetDocumentation() const;
2012-02-28 17:05:54 +04:00
/// Default constructor
cmPropertyDefinition() { this->Chained = false; };
2012-02-28 17:05:54 +04:00
/// Is the property chained?
bool IsChained() const { return this->Chained; };
2012-02-28 17:05:54 +04:00
/// Get the section if any
const std::string &GetDocumentationSection() const {
return this->DocumentationSection; };
2012-02-28 17:05:54 +04:00
/// Get the scope
cmProperty::ScopeType GetScope() const {
return this->Scope; };
2012-02-28 17:05:54 +04:00
/// Get the documentation (short version)
const std::string &GetShortDescription() const {
2012-02-28 17:05:54 +04:00
return this->ShortDescription; };
/// Get the documentation (full version)
const std::string &GetFullDescription() const {
return this->FullDescription; };
2012-02-28 17:05:54 +04:00
protected:
std::string Name;
std::string ShortDescription;
std::string FullDescription;
std::string DocumentationSection;
2012-02-28 17:05:54 +04:00
cmProperty::ScopeType Scope;
bool Chained;
};
#endif