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

Method setKeyName

src/model/MeterCustom.cpp:140–151  ·  view source on GitHub ↗

Set the Key Name at index. Indexing starts at 0. */

Source from the content-addressed store, hash-verified

138
139 /** Set the Key Name at index. Indexing starts at 0. */
140 bool MeterCustom_Impl::setKeyName(unsigned index, const std::string& str) {
141 IdfExtensibleGroup eg = getExtensibleGroup(index);
142 if (!eg.empty()) {
143 return eg.setString(OS_Meter_CustomExtensibleFields::KeyName, str);
144 } else {
145 StringVector values(2u);
146 values[OS_Meter_CustomExtensibleFields::KeyName] = str;
147 return !insertExtensibleGroup(index, values).empty();
148 }
149 OS_ASSERT(false);
150 return false;
151 }
152
153 /** Get the Output Variable of Meter Name at index. Indexing starts at 0. */
154 boost::optional<std::string> MeterCustom_Impl::outputVariableorMeterName(unsigned index) const {

Callers 6

TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
prepareSensor2_EMSFunction · 0.45

Calls 2

emptyMethod · 0.45
setStringMethod · 0.45

Tested by 5

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
prepareSensor2_EMSFunction · 0.36