2016-09-27 19:01:08 +00: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 18:35:21 +00:00
|
|
|
#ifndef cmPropertyDefinition_h
|
|
|
|
#define cmPropertyDefinition_h
|
|
|
|
|
2016-08-23 22:29:15 +00:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
|
|
|
|
2006-12-01 18:35:21 +00:00
|
|
|
#include "cmProperty.h"
|
|
|
|
|
2016-08-23 22:29:15 +00:00
|
|
|
#include <string>
|
|
|
|
|
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
|
2013-09-02 20:27:32 +00:00
|
|
|
void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
|
2016-05-16 14:34:04 +00:00
|
|
|
const char* ShortDescription,
|
|
|
|
const char* FullDescription, bool chained);
|
2006-12-01 18:35:21 +00:00
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Default constructor
|
2014-04-03 19:35:22 +00:00
|
|
|
cmPropertyDefinition() { this->Chained = false; }
|
2006-12-01 18:35:21 +00:00
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Is the property chained?
|
2014-04-03 19:35:22 +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 scope
|
2016-05-16 14:34:04 +00:00
|
|
|
cmProperty::ScopeType GetScope() const { return this->Scope; }
|
2007-10-22 16:49:09 +00:00
|
|
|
|
2012-02-28 13:05:54 +00:00
|
|
|
/// Get the documentation (short version)
|
2016-05-16 14:34:04 +00:00
|
|
|
const std::string& GetShortDescription() const
|
|
|
|
{
|
|
|
|
return this->ShortDescription;
|
|
|
|
}
|
2012-02-28 13:05:54 +00:00
|
|
|
|
|
|
|
/// Get the documentation (full version)
|
2016-05-16 14:34:04 +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;
|
2012-02-28 13:05:54 +00:00
|
|
|
cmProperty::ScopeType Scope;
|
2006-12-01 18:35:21 +00:00
|
|
|
bool Chained;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|