#include <GenericUncertaintyDescription.hpp>
Public Member Functions | |
Constructors and Destructors | |
GenericUncertaintyDescription (const UncertaintyDescriptionType &type) | |
GenericUncertaintyDescription (const UncertaintyDescriptionType &type, const std::vector< Attribute > &attributes) | |
Constructor provided for deserialization; not for general use. More... | |
virtual | ~GenericUncertaintyDescription () |
Getters and Queries | |
UncertaintyDescriptionType | actualType () const |
Returns the UncertaintyDescriptionType that was used to construct this object, that is, the underlying, actual, type. More... | |
std::vector< Attribute > | attributes () const |
Returns all options that are set. More... | |
std::vector< AttributeDescription > | attributeDescriptions () const |
Describes all options for this UncertaintyDescription::type(), including whether they are required. More... | |
Attribute | getAttribute (const std::string &attributeName) const |
Returns Attribute attributeName by value (returned object does not share data with private member). More... | |
bool | isSet (const std::string &attributeName) const |
bool | isComplete () const |
Returns true if all required attributes are set. More... | |
Setters | |
bool | setAttribute (const Attribute &candidate) |
Sets candidate Attribute if possible. More... | |
bool | clearAttribute (const std::string &attributeName) |
Clears Attribute attributeName if that Attribute is currently set and is not required. More... | |
Public Member Functions inherited from openstudio::analysis::UncertaintyDescription | |
virtual | ~UncertaintyDescription () |
UncertaintyDescription | clone () const |
UncertaintyDescriptionType | type () const |
void | restoreDefaults () |
Restores the default options for this UncertaintyDescription and its type(). More... | |
template<typename T > | |
T | cast () const |
Casts the UncertaintyDescription to type T, if possible. More... | |
template<typename T > | |
boost::optional< T > | optionalCast () const |
Static Public Member Functions | |
static UncertaintyDescriptionType | type () |
Returns the interface UncertaintyDescriptionType, that is, UncertaintyDescriptionType::Generic. More... | |
Static Public Member Functions inherited from openstudio::analysis::UncertaintyDescription | |
static std::vector < UncertaintyDescriptionType > | validTypes (const VariableValueType &variableValueType) |
Returns all the UncertaintyDescriptionTypes that are applicable to variableValueType (VariableValueType::Continuous or VariableValueType::Discrete). More... | |
static std::vector < UncertaintyDescriptionType > | validTypes (const VariableValueType &variableValueType, const UncertaintyType &uncertaintyType) |
Returns all the UncertaintyDescriptionTypes that are applicable to the specified combination of variableValueType (VariableValueType::Continuous or VariableValueType::Discrete) and uncertaintyType (UncertaintyType::Aleatory or UncertaintyType::Epistemic). More... | |
Protected Member Functions | |
GenericUncertaintyDescription (std::shared_ptr< detail::UncertaintyDescription_Impl > impl) | |
Protected Member Functions inherited from openstudio::analysis::UncertaintyDescription | |
UncertaintyDescription (std::shared_ptr< detail::UncertaintyDescription_Impl > impl) | |
Related Functions | |
(Note that these are not member functions.) | |
typedef std::vector < GenericUncertaintyDescription > | GenericUncertaintyDescriptionVector |
Related Functions inherited from openstudio::analysis::UncertaintyDescription | |
typedef boost::optional < UncertaintyDescription > | OptionalUncertaintyDescription |
Additional Inherited Members | |
Protected Types inherited from openstudio::analysis::UncertaintyDescription | |
typedef detail::UncertaintyDescription_Impl | ImplType |
GenericUncertaintyDescription is an UncertaintyDescription interface for use by APIs and for serialization/deserialization.
It works equally well for all UncertaintyDescriptionTypes .
openstudio::analysis::GenericUncertaintyDescription::GenericUncertaintyDescription | ( | const UncertaintyDescriptionType & | type | ) |
openstudio::analysis::GenericUncertaintyDescription::GenericUncertaintyDescription | ( | const UncertaintyDescriptionType & | type, |
const std::vector< Attribute > & | attributes | ||
) |
Constructor provided for deserialization; not for general use.
|
inlinevirtual |
|
explicitprotected |
UncertaintyDescriptionType openstudio::analysis::GenericUncertaintyDescription::actualType | ( | ) | const |
Returns the UncertaintyDescriptionType that was used to construct this object, that is, the underlying, actual, type.
std::vector<AttributeDescription> openstudio::analysis::GenericUncertaintyDescription::attributeDescriptions | ( | ) | const |
Describes all options for this UncertaintyDescription::type(), including whether they are required.
std::vector<Attribute> openstudio::analysis::GenericUncertaintyDescription::attributes | ( | ) | const |
Returns all options that are set.
bool openstudio::analysis::GenericUncertaintyDescription::clearAttribute | ( | const std::string & | attributeName | ) |
Clears Attribute attributeName if that Attribute is currently set and is not required.
Attribute openstudio::analysis::GenericUncertaintyDescription::getAttribute | ( | const std::string & | attributeName | ) | const |
Returns Attribute attributeName by value (returned object does not share data with private member).
Throws if not isSet(attributeName).
bool openstudio::analysis::GenericUncertaintyDescription::isComplete | ( | ) | const |
Returns true if all required attributes are set.
bool openstudio::analysis::GenericUncertaintyDescription::isSet | ( | const std::string & | attributeName | ) | const |
bool openstudio::analysis::GenericUncertaintyDescription::setAttribute | ( | const Attribute & | candidate | ) |
Sets candidate Attribute if possible.
Must match one of the attributeDescriptions().
|
static |
Returns the interface UncertaintyDescriptionType, that is, UncertaintyDescriptionType::Generic.
|
related |