2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2006-12-01 21:35:21 +03: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.
|
2006-12-01 21:35:21 +03: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.
|
|
|
|
============================================================================*/
|
2006-12-01 21:35:21 +03:00
|
|
|
#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
|
2006-12-01 21:35:21 +03:00
|
|
|
{
|
|
|
|
public:
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Define this property
|
2006-12-01 21:35:21 +03:00
|
|
|
void DefineProperty(const char *name, cmProperty::ScopeType scope,
|
|
|
|
const char *ShortDescription,
|
2012-08-13 21:42:58 +04:00
|
|
|
const char *FullDescription,
|
2007-10-22 20:49:09 +04:00
|
|
|
const char *DocumentationSection,
|
2006-12-01 21:35:21 +03:00
|
|
|
bool chained);
|
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Get the documentation string
|
2006-12-01 21:35:21 +03:00
|
|
|
cmDocumentationEntry GetDocumentation() const;
|
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Default constructor
|
2006-12-01 21:35:21 +03:00
|
|
|
cmPropertyDefinition() { this->Chained = false; };
|
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Is the property chained?
|
2012-02-24 23:37:02 +04:00
|
|
|
bool IsChained() const { return this->Chained; };
|
2006-12-01 21:35:21 +03:00
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Get the section if any
|
2007-10-22 20:49:09 +04:00
|
|
|
const std::string &GetDocumentationSection() const {
|
2012-08-13 21:42:58 +04:00
|
|
|
return this->DocumentationSection; };
|
2012-02-28 17:05:54 +04:00
|
|
|
|
|
|
|
/// Get the scope
|
2007-10-22 20:49:09 +04:00
|
|
|
cmProperty::ScopeType GetScope() const {
|
|
|
|
return this->Scope; };
|
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Get the documentation (short version)
|
2007-10-24 22:43:10 +04:00
|
|
|
const std::string &GetShortDescription() const {
|
2012-02-28 17:05:54 +04:00
|
|
|
return this->ShortDescription; };
|
|
|
|
|
|
|
|
/// Get the documentation (full version)
|
2007-10-24 22:43:10 +04:00
|
|
|
const std::string &GetFullDescription() const {
|
2012-08-13 21:42:58 +04:00
|
|
|
return this->FullDescription; };
|
2012-02-28 17:05:54 +04:00
|
|
|
|
2006-12-01 21:35:21 +03:00
|
|
|
protected:
|
|
|
|
std::string Name;
|
|
|
|
std::string ShortDescription;
|
|
|
|
std::string FullDescription;
|
2007-10-22 20:49:09 +04:00
|
|
|
std::string DocumentationSection;
|
2012-02-28 17:05:54 +04:00
|
|
|
cmProperty::ScopeType Scope;
|
2006-12-01 21:35:21 +03:00
|
|
|
bool Chained;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|