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

Method registerEquivalentString

src/utilities/units/UnitFactory.cpp:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool UnitFactory::registerEquivalentString(const std::string& equivalentString, const std::string& standardString) {
116 // register the pair
117 bool result = m_standardStringLookupMap.insert(StandardStringLookupMap::value_type(equivalentString, StringVector(1u, standardString))).second;
118
119 if (!result) {
120 // equivalentString is already a key. add this one
121 m_standardStringLookupMap[equivalentString].push_back(standardString);
122 }
123
124 return result;
125}
126
127boost::optional<Unit> UnitFactory::createUnit(const std::string& unitString, UnitSystem system) const {
128 if (m_callbackMaps.empty()) {

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected