#include <OnDemandGenerator.hpp>
Public Member Functions | |
Constructor | |
OnDemandGeneratorArgument (const QDomElement &argumentElement) | |
Constructs an OnDemandGenerator from its xml description. More... | |
Destructors | |
virtual | ~OnDemandGeneratorArgument () |
virtual destructor More... | |
Class members | |
std::string | name () const |
Get the name of this argument. More... | |
std::string | displayName () const |
Get the display name of this argument. More... | |
OnDemandGeneratorArgumentType | dataType () const |
Get the data type of this argument. More... | |
bool | required () const |
Returns true if this is a required argument. More... | |
OnDemandGeneratorInputType | inputType () const |
Get the input type of this argument. More... | |
std::string | units () const |
Get the units of this argument if any. More... | |
std::string | componentType () const |
Get the component type (e.g. taxonomy term such as 'Lighting.Indoor Lighting.Lamp') of this argument if any. More... | |
std::vector < OnDemandGeneratorValueRestriction > | valueRestrictions () const |
Get any restrictions on the value of this argument. More... | |
std::vector < OnDemandGeneratorArgument > | activeArguments () const |
Returns this argument and all nested arguments which are currently active in depth first search order (e.g. More... | |
std::vector< std::string > | activeArgumentNames () const |
Returns this name, plus name of all arguments which are currently active in depth first search order (e.g. More... | |
boost::optional < OnDemandGeneratorArgument > | getActiveArgument (const std::string &name) const |
Returns argument by name, searches through the active argument tree starting with this. More... | |
bool | hasValue () const |
Returns true if a value has been set for this argument. More... | |
boost::optional< std::string > | valueAsString () const |
Returns the value as a string if possible. More... | |
boost::optional< double > | valueAsDouble () const |
Returns the value as a double if possible. More... | |
boost::optional< int > | valueAsInteger () const |
Returns the value as an integer if possible. More... | |
This class represents an argument to an on demand generator script.
openstudio::OnDemandGeneratorArgument::OnDemandGeneratorArgument | ( | const QDomElement & | argumentElement | ) |
Constructs an OnDemandGenerator from its xml description.
|
virtual |
virtual destructor
std::vector<std::string> openstudio::OnDemandGeneratorArgument::activeArgumentNames | ( | ) | const |
Returns this name, plus name of all arguments which are currently active in depth first search order (e.g.
top level arguments + nested arguments directly underneath arguments with value set)
std::vector<OnDemandGeneratorArgument> openstudio::OnDemandGeneratorArgument::activeArguments | ( | ) | const |
Returns this argument and all nested arguments which are currently active in depth first search order (e.g.
top level arguments + nested arguments directly underneath arguments with value set)
std::string openstudio::OnDemandGeneratorArgument::componentType | ( | ) | const |
Get the component type (e.g. taxonomy term such as 'Lighting.Indoor Lighting.Lamp') of this argument if any.
OnDemandGeneratorArgumentType openstudio::OnDemandGeneratorArgument::dataType | ( | ) | const |
Get the data type of this argument.
std::string openstudio::OnDemandGeneratorArgument::displayName | ( | ) | const |
Get the display name of this argument.
boost::optional<OnDemandGeneratorArgument> openstudio::OnDemandGeneratorArgument::getActiveArgument | ( | const std::string & | name | ) | const |
Returns argument by name, searches through the active argument tree starting with this.
bool openstudio::OnDemandGeneratorArgument::hasValue | ( | ) | const |
Returns true if a value has been set for this argument.
OnDemandGeneratorInputType openstudio::OnDemandGeneratorArgument::inputType | ( | ) | const |
Get the input type of this argument.
std::string openstudio::OnDemandGeneratorArgument::name | ( | ) | const |
Get the name of this argument.
bool openstudio::OnDemandGeneratorArgument::required | ( | ) | const |
Returns true if this is a required argument.
std::string openstudio::OnDemandGeneratorArgument::units | ( | ) | const |
Get the units of this argument if any.
boost::optional<double> openstudio::OnDemandGeneratorArgument::valueAsDouble | ( | ) | const |
Returns the value as a double if possible.
boost::optional<int> openstudio::OnDemandGeneratorArgument::valueAsInteger | ( | ) | const |
Returns the value as an integer if possible.
boost::optional<std::string> openstudio::OnDemandGeneratorArgument::valueAsString | ( | ) | const |
Returns the value as a string if possible.
std::vector<OnDemandGeneratorValueRestriction> openstudio::OnDemandGeneratorArgument::valueRestrictions | ( | ) | const |
Get any restrictions on the value of this argument.