| 121 | } |
| 122 | |
| 123 | Component UNIFACParameterLibrary::get_component(const std::string& identifier, const std::string& value) const { |
| 124 | if (identifier == "name") { |
| 125 | for (const auto& component : components) { |
| 126 | if (component.name == value) { |
| 127 | return component; |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | throw CoolProp::ValueError(format("Could not find component: %s with identifier: %s", value.c_str(), identifier.c_str())); |
| 132 | } |
| 133 | |
| 134 | }; /* namespace UNIFACLibrary */ |
| 135 |
no test coverage detected