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

Method push_back

src/utilities/units/OSQuantityVector.cpp:118–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void OSQuantityVector::push_back(Quantity q) {
119 if (!(q.units() == units())) {
120 LOG_AND_THROW("Quantity " << q
121 << " is incompatible with this OSQuantityVector, which has "
122 "units "
123 << units() << ".");
124 } else if (q.scale() != scale()) {
125 q.setScale(scale().exponent);
126 }
127 m_values.push_back(q.value());
128}
129
130void OSQuantityVector::pop_back() {
131 m_values.pop_back();

Callers 7

setBaseUnitExponentMethod · 0.45
operator*=Method · 0.45
quantitiesMethod · 0.45
SetUpTestSuiteMethod · 0.45
TEST_FFunction · 0.45

Calls 4

unitsMethod · 0.45
scaleMethod · 0.45
setScaleMethod · 0.45
valueMethod · 0.45

Tested by 2

SetUpTestSuiteMethod · 0.36
TEST_FFunction · 0.36