OpenStudio:measure
Loading...
Searching...
No Matches
List of all members
openstudio::measure::ModelicaMeasure Class Reference

#include <ModelicaMeasure.hpp>

+ Inheritance diagram for openstudio::measure::ModelicaMeasure:

Public Member Functions

Getters
virtual std::vector< OSArgumentarguments (const openstudio::model::Model &model, const openstudio::Workspace &workspace) const
 Returns the arguments for this script.
 
- Public Member Functions inherited from openstudio::measure::OSMeasure
virtual ~OSMeasure ()=default
 
virtual std::string name () const
 user facing name of this measure, defaults to empty
 
virtual std::string description () const
 user facing description of this measure, defaults to empty
 
virtual std::string taxonomy () const
 user facing BCL taxonomy of this measure, defaults to empty
 
virtual std::string modeler_description () const
 user facing technical description of this measure, defaults to empty
 
MeasureType measureType () const
 
virtual OS_DEPRECATED bool registerWithSketchUp () const
 Register this script with SketchUp.
 
virtual OS_DEPRECATED bool registerWithApplication () const
 Register this script with an Application.
 

Actions

virtual bool run (openstudio::modelica::ModelicaFile &modelicaFile, openstudio::model::Model &model, const openstudio::Workspace &workspace, OSRunner &runner, const std::map< std::string, OSArgument > &user_arguments) const
 Run the script on the given model with the given runner and user_arguments.
 
 ModelicaMeasure ()
 

Additional Inherited Members

- Protected Member Functions inherited from openstudio::measure::OSMeasure
 OSMeasure (MeasureType measureType)
 

Detailed Description

ModelicaMeasure is an abstract base class for UserScripts that operate on Modelica Models.

Constructor & Destructor Documentation

◆ ModelicaMeasure()

openstudio::measure::ModelicaMeasure::ModelicaMeasure ( )
protected

Member Function Documentation

◆ arguments()

virtual std::vector< OSArgument > openstudio::measure::ModelicaMeasure::arguments ( const openstudio::model::Model & model,
const openstudio::Workspace & workspace ) 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.

◆ run()

virtual bool openstudio::measure::ModelicaMeasure::run ( openstudio::modelica::ModelicaFile & modelicaFile,
openstudio::model::Model & model,
const openstudio::Workspace & workspace,
OSRunner & runner,
const std::map< std::string, OSArgument > & user_arguments ) const
virtual

Run the script on the given model with the given runner and user_arguments.

The base class implementation calls runner.prepareForMeasureRun(*this) and should be called at the beginning of derived class implementations of this method. (In C++, that call looks like ModelicaMeasure::run(model, workspace, runner, user_arguments). In Ruby that call looks like super(model, workspace, runner, user_arguments).