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

Function createDimensionlessUnit

src/utilities/units/UnitFactory.cpp:717–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715}
716
717Unit createDimensionlessUnit(UnitSystem system) {
718 switch (system.value()) {
719 case UnitSystem::Mixed:
720 return Unit();
721 case UnitSystem::SI:
722 return SIUnit();
723 case UnitSystem::IP:
724 return IPUnit();
725 case UnitSystem::BTU:
726 return BTUUnit();
727 case UnitSystem::CFM:
728 return CFMUnit();
729 case UnitSystem::GPD:
730 return GPDUnit();
731 case UnitSystem::MPH:
732 return MPHUnit();
733 case UnitSystem::Therm:
734 return ThermUnit();
735 case UnitSystem::Wh:
736 return WhUnit();
737 case UnitSystem::Misc1:
738 return Misc1Unit();
739 case UnitSystem::Celsius:
740 return CelsiusUnit();
741 case UnitSystem::Fahrenheit:
742 return FahrenheitUnit();
743 default:
744 OS_ASSERT(false);
745 }
746 return Unit();
747}
748
749boost::optional<Unit> createUnit(const std::string& unitString, UnitSystem system) {
750 return UnitFactory::instance().createUnit(unitString, system);

Callers 2

createUnitSimpleMethod · 0.85
QuantityMethod · 0.85

Calls 2

UnitClass · 0.50
valueMethod · 0.45

Tested by

no test coverage detected