#include <OSResult.hpp>
Public Member Functions | |
Constructors and Destructors | |
| OSResult () | |
| Default constructor sets value() to OSResultValue::Success. More... | |
| OSResult (const QDomElement &element) | |
| Construct from XML content. More... | |
Getters | |
| OSResultValue | value () const |
| std::vector< LogMessage > | errors () const |
| std::vector< LogMessage > | warnings () const |
| std::vector< LogMessage > | info () const |
| boost::optional< LogMessage > | initialCondition () const |
| boost::optional< LogMessage > | finalCondition () const |
| std::vector< Attribute > | attributes () const |
Setters | |
Typically, these methods are not used directly, but are called by OSRunner methods such as OSRunner::registerError, OSRunner::registerAsNotApplicable. | |
| void | setValue (const OSResultValue &value) |
| Set the result value. More... | |
| void | addError (const std::string &channel, const std::string &message) |
| void | addWarning (const std::string &channel, const std::string &message) |
| void | addInfo (const std::string &channel, const std::string &message) |
| void | setInitialCondition (const std::string &channel, const std::string &message) |
| void | setFinalCondition (const std::string &channel, const std::string &message) |
| void | appendAttribute (const Attribute &attribute) |
Related Functions | |
(Note that these are not member functions.) | |
| typedef boost::optional< OSResult > | OptionalOSResult |
Serialization | |
| bool | save (const openstudio::path &p, bool overwrite=false) const |
| Saves this OSResult to path p (using an XML format and extension .ossr). More... | |
| static boost::optional< OSResult > | load (const openstudio::path &p) |
| Loads OSResult from the XML .ossr file at path p, if possible. More... | |
Class for documenting the outcome of running a UserScript or a Ruleset.
There is an overall result flag (available from value()), and a number of message types.
| openstudio::ruleset::OSResult::OSResult | ( | ) |
Default constructor sets value() to OSResultValue::Success.
|
explicit |
Construct from XML content.
Called by OSResult::load.
| void openstudio::ruleset::OSResult::addError | ( | const std::string & | channel, |
| const std::string & | message | ||
| ) |
| void openstudio::ruleset::OSResult::addInfo | ( | const std::string & | channel, |
| const std::string & | message | ||
| ) |
| void openstudio::ruleset::OSResult::addWarning | ( | const std::string & | channel, |
| const std::string & | message | ||
| ) |
| void openstudio::ruleset::OSResult::appendAttribute | ( | const Attribute & | attribute | ) |
| std::vector<Attribute> openstudio::ruleset::OSResult::attributes | ( | ) | const |
| std::vector<LogMessage> openstudio::ruleset::OSResult::errors | ( | ) | const |
| boost::optional<LogMessage> openstudio::ruleset::OSResult::finalCondition | ( | ) | const |
| std::vector<LogMessage> openstudio::ruleset::OSResult::info | ( | ) | const |
| boost::optional<LogMessage> openstudio::ruleset::OSResult::initialCondition | ( | ) | const |
|
static |
Loads OSResult from the XML .ossr file at path p, if possible.
Otherwise, returns boost::none.
| bool openstudio::ruleset::OSResult::save | ( | const openstudio::path & | p, |
| bool | overwrite = false |
||
| ) | const |
Saves this OSResult to path p (using an XML format and extension .ossr).
| void openstudio::ruleset::OSResult::setFinalCondition | ( | const std::string & | channel, |
| const std::string & | message | ||
| ) |
| void openstudio::ruleset::OSResult::setInitialCondition | ( | const std::string & | channel, |
| const std::string & | message | ||
| ) |
| void openstudio::ruleset::OSResult::setValue | ( | const OSResultValue & | value | ) |
Set the result value.
| OSResultValue openstudio::ruleset::OSResult::value | ( | ) | const |
| std::vector<LogMessage> openstudio::ruleset::OSResult::warnings | ( | ) | const |
|
related |