MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / remove

Method remove

src/model/OutputVariable.cpp:63–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 std::vector<openstudio::IdfObject> OutputVariable_Impl::remove() {
64 //Note: Cant do /object-list implementation for EMS Sensor since Auto Naming of Objects causes issues.
65 // Instead, doing an /alpha getString implementation so we need to manually remove any referring Sensors
66 const Model m = this->model();
67
68 std::vector<EnergyManagementSystemSensor> objects = m.getConcreteModelObjects<EnergyManagementSystemSensor>();
69 for (auto& sensor : objects) {
70 if (sensor.outputVariable()) {
71 //if (sensor.outputVariable().get().variableName() == this->variableName()) {
72 // sensor.remove();
73 //}
74 // check handle instead of name
75 if (sensor.outputVariable().get().handle() == this->handle()) {
76 sensor.remove();
77 }
78 }
79 }
80
81 return ModelObject_Impl::remove();
82 }
83
84 std::vector<ScheduleTypeKey> OutputVariable_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
85 std::vector<ScheduleTypeKey> result;

Callers

nothing calls this directly

Calls 4

outputVariableMethod · 0.80
modelMethod · 0.45
handleMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected