17 #ifdef MOOSE_UNIT_TEST 19 #include "gtest/gtest.h" 33 using Value = std::variant<bool, int, std::string>;
38 const std::string_view doc);
103 #if defined(MOOSE_UNIT_TEST) || defined(FOR_PYCAPABILITIES) 179 #ifdef MOOSE_UNIT_TEST 181 FRIEND_TEST(::CapabilitiesTest, isInstallationType);
197 #if defined(MOOSE_UNIT_TEST) || defined(FOR_PYCAPABILITIES) bool getBoolValue() const
bool hasStringValue() const
std::string _doc
Description for the capability.
const std::set< std::string > & getEnumeration() const
Capability::Value _value
The value the capability is set to.
const std::string * queryStringValue() const
const std::string & getStringValue() const
std::string toString() const
class GTEST_TEST_CLASS_NAME_(CapabilityTest, negateValue)
const int * queryIntValue() const
bool _explicit
Whether or not this capability must be compared explicitly (not as a boolean check) ...
std::variant< bool, int, std::string > Value
A capability can have a bool, int, or string value.
const std::string & getDoc() const
void negateValue()
Negate a Capability value.
An entry for a single capability.
std::string enumerationToString() const
bool hasBoolValue() const
bool hasEnumeration(const std::string &value) const
FRIEND_TEST(::CapabilityTest, negateValue)
const std::optional< std::set< std::string > > & queryEnumeration() const
const std::string & getName() const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::optional< std::set< std::string > > _enumeration
Possible enumeration for the capability, if any (string capabilities only)
const bool * queryBoolValue() const
Capability & setEnumeration(const std::set< std::string > &enumeration)
Set the enumeration (allowed values) for the capability.
std::string _name
The name of capability.
Capability & setExplicit()
Set the capability to be explicit.
const Capability::Value & getValue() const
std::string valueToString() const