2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2006-12-01 21:35:21 +03:00
|
|
|
#ifndef cmPropertyDefinition_h
|
|
|
|
#define cmPropertyDefinition_h
|
|
|
|
|
2016-08-24 01:29:15 +03:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
|
|
|
|
2006-12-01 21:35:21 +03:00
|
|
|
#include "cmProperty.h"
|
|
|
|
|
2016-08-24 01:29:15 +03:00
|
|
|
#include <string>
|
|
|
|
|
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
|
2013-09-03 00:27:32 +04:00
|
|
|
void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
|
2016-05-16 17:34:04 +03:00
|
|
|
const char* ShortDescription,
|
|
|
|
const char* FullDescription, bool chained);
|
2006-12-01 21:35:21 +03:00
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Default constructor
|
2014-04-03 23:35:22 +04:00
|
|
|
cmPropertyDefinition() { this->Chained = false; }
|
2006-12-01 21:35:21 +03:00
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Is the property chained?
|
2014-04-03 23:35:22 +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 scope
|
2016-05-16 17:34:04 +03:00
|
|
|
cmProperty::ScopeType GetScope() const { return this->Scope; }
|
2007-10-22 20:49:09 +04:00
|
|
|
|
2012-02-28 17:05:54 +04:00
|
|
|
/// Get the documentation (short version)
|
2016-05-16 17:34:04 +03:00
|
|
|
const std::string& GetShortDescription() const
|
|
|
|
{
|
|
|
|
return this->ShortDescription;
|
|
|
|
}
|
2012-02-28 17:05:54 +04:00
|
|
|
|
|
|
|
/// Get the documentation (full version)
|
2016-05-16 17:34:04 +03:00
|
|
|
const std::string& GetFullDescription() const
|
|
|
|
{
|
|
|
|
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;
|
2012-02-28 17:05:54 +04:00
|
|
|
cmProperty::ScopeType Scope;
|
2006-12-01 21:35:21 +03:00
|
|
|
bool Chained;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|