| 145 | } |
| 146 | |
| 147 | std::string ReadValue(webifc::parsing::IfcLoader &loader, webifc::parsing::IfcTokenType t) |
| 148 | { |
| 149 | switch (t) |
| 150 | { |
| 151 | case webifc::parsing::IfcTokenType::STRING: |
| 152 | { |
| 153 | return loader.GetDecodedStringArgument(); |
| 154 | } |
| 155 | case webifc::parsing::IfcTokenType::ENUM: |
| 156 | { |
| 157 | std::string_view s = loader.GetStringArgument(); |
| 158 | return std::string(s); |
| 159 | } |
| 160 | case webifc::parsing::IfcTokenType::REAL: |
| 161 | { |
| 162 | std::string_view s = loader.GetDoubleArgumentAsString(); |
| 163 | return std::string(s); |
| 164 | } |
| 165 | case webifc::parsing::IfcTokenType::INTEGER: |
| 166 | { |
| 167 | long d = loader.GetIntArgument(); |
| 168 | return std::to_string(d); |
| 169 | } |
| 170 | case webifc::parsing::IfcTokenType::REF: |
| 171 | { |
| 172 | uint32_t ref = loader.GetRefArgument(); |
| 173 | return std::to_string(ref); |
| 174 | } |
| 175 | default: |
| 176 | // use undefined to signal val parse issue |
| 177 | return ""; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | std::string GetArgs(webifc::parsing::IfcLoader &loader, bool inObject = false, bool inList = false) |
| 182 | { |
no test coverage detected