cmake/Source/cmPropertyDefinition.h

59 lines
1.5 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmPropertyDefinition_h
#define cmPropertyDefinition_h
2017-07-20 19:35:53 +02:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include "cmProperty.h"
2016-10-30 18:24:19 +01:00
#include <string>
2012-04-19 19:04:21 +03: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-04-19 19:04:21 +03:00
/// Define this property
2015-04-27 22:25:09 +02:00
void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
2016-07-09 11:21:54 +02:00
const char* ShortDescription,
const char* FullDescription, bool chained);
2012-04-19 19:04:21 +03:00
/// Default constructor
2015-04-27 22:25:09 +02:00
cmPropertyDefinition() { this->Chained = false; }
2012-04-19 19:04:21 +03:00
/// Is the property chained?
2015-04-27 22:25:09 +02:00
bool IsChained() const { return this->Chained; }
2012-04-19 19:04:21 +03:00
/// Get the scope
2016-07-09 11:21:54 +02:00
cmProperty::ScopeType GetScope() const { return this->Scope; }
2012-04-19 19:04:21 +03:00
/// Get the documentation (short version)
2016-07-09 11:21:54 +02:00
const std::string& GetShortDescription() const
{
return this->ShortDescription;
}
2012-04-19 19:04:21 +03:00
/// Get the documentation (full version)
2016-07-09 11:21:54 +02:00
const std::string& GetFullDescription() const
{
return this->FullDescription;
}
2012-04-19 19:04:21 +03:00
protected:
std::string Name;
std::string ShortDescription;
std::string FullDescription;
2012-04-19 19:04:21 +03:00
cmProperty::ScopeType Scope;
bool Chained;
};
#endif