#include <ReportingUserScript.hpp>
ReportingUserScript is an abstract base class for UserScripts that generate reports.
virtual openstudio::ruleset::ReportingUserScript::~ReportingUserScript |
( |
| ) |
|
|
virtual |
openstudio::ruleset::ReportingUserScript::ReportingUserScript |
( |
| ) |
|
|
inlineprotected |
virtual std::vector<OSArgument> openstudio::ruleset::ReportingUserScript::arguments |
( |
| ) |
const |
|
virtual |
Returns the arguments for this script.
In interactive applications, an OSRunner presents these arguments to the user to produce an OSArgumentMap of user_arguments that it then passes to this script's run method. The same basic steps should happen in applications with non- interactive scripts, but in that case an entity other than an OSRunner may be in charge of collecting user arguments. The base class implementation returns an empty vector.
virtual std::vector<IdfObject> openstudio::ruleset::ReportingUserScript::energyPlusOutputRequests |
( |
OSRunner & |
runner, |
|
|
const std::map< std::string, OSArgument > & |
user_arguments |
|
) |
| const |
|
virtual |
This method is called on all reporting measures immediately before the E+ simulation.
The code that injects these objects into the IDF checks that only objects of allowed types are added to prevent changes that impact energy use. The injector code also prevents duplicate report requests. The default implementation of this method returns an empty vector. The runner allows the user to load the last osm/idf and to log messages. The argument map is available with the arguments for the reporting measure.
virtual bool openstudio::ruleset::ReportingUserScript::run |
( |
OSRunner & |
runner, |
|
|
const std::map< std::string, OSArgument > & |
user_arguments |
|
) |
| const |
|
virtual |
Run the script with the given runner and user_arguments.
The base class implementation calls runner.prepareForUserScriptRun(*this) and should be called at the beginning of derived class implementations of this method. (In C++, that call looks like ReportingUserScript::run(runner, user_arguments). In Ruby that call looks like super(runner, user_arguments).