2009-09-28 15:43:28 +00:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2006-12-01 18:35:21 +00:00
|
|
|
|
2009-09-28 15:43:28 +00:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2006-12-01 18:35:21 +00:00
|
|
|
|
2009-09-28 15:43:28 +00: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.
|
|
|
|
============================================================================*/
|
2006-12-01 18:35:21 +00:00
|
|
|
#ifndef cmPropertyDefinition_h
|
|
|
|
#define cmPropertyDefinition_h
|
|
|
|
|
|
|
|
#include "cmProperty.h"
|
|
|
|
|
2012-02-28 13:05:54 +00: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
|
2006-12-01 18:35:21 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Define this property
|
2006-12-01 18:35:21 +00:00
|
|
|
void DefineProperty(const char *name, cmProperty::ScopeType scope,
|
|
|
|
const char *ShortDescription,
|
|
|
|
const char *FullDescription,
|
2007-10-22 16:49:09 +00:00
|
|
|
const char *DocumentationSection,
|
2006-12-01 18:35:21 +00:00
|
|
|
bool chained);
|
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Get the documentation string
|
2006-12-01 18:35:21 +00:00
|
|
|
cmDocumentationEntry GetDocumentation() const;
|
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Default constructor
|
2006-12-01 18:35:21 +00:00
|
|
|
cmPropertyDefinition() { this->Chained = false; };
|
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Is the property chained?
|
2012-02-24 19:37:02 +00:00
|
|
|
bool IsChained() const { return this->Chained; };
|
2006-12-01 18:35:21 +00:00
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Get the section if any
|
2007-10-22 16:49:09 +00:00
|
|
|
const std::string &GetDocumentationSection() const {
|
|
|
|
return this->DocumentationSection; };
|
2012-02-28 13:05:54 +00:00
|
|
|
|
|
|
|
/// Get the scope
|
2007-10-22 16:49:09 +00:00
|
|
|
cmProperty::ScopeType GetScope() const {
|
|
|
|
return this->Scope; };
|
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Get the documentation (short version)
|
2007-10-24 18:43:10 +00:00
|
|
|
const std::string &GetShortDescription() const {
|
2012-02-28 13:05:54 +00:00
|
|
|
return this->ShortDescription; };
|
|
|
|
|
|
|
|
/// Get the documentation (full version)
|
2007-10-24 18:43:10 +00:00
|
|
|
const std::string &GetFullDescription() const {
|
|
|
|
return this->FullDescription; };
|
2012-02-28 13:05:54 +00:00
|
|
|
|
2006-12-01 18:35:21 +00:00
|
|
|
protected:
|
|
|
|
std::string Name;
|
|
|
|
std::string ShortDescription;
|
|
|
|
std::string FullDescription;
|
2007-10-22 16:49:09 +00:00
|
|
|
std::string DocumentationSection;
|
2012-02-28 13:05:54 +00:00
|
|
|
cmProperty::ScopeType Scope;
|
2006-12-01 18:35:21 +00:00
|
|
|
bool Chained;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|