MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / deserialize

Function deserialize

src/ifcparse/IfcEntityInstanceData.h:232–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230
231 template <typename T, typename std::enable_if<is_contiguous_container<T>::value && !is_contiguous_container<typename T::value_type>::value, int>::type = 0>
232 bool deserialize(IfcParse::impl::rocks_db_file_storage*, const std::string& val, T& t, bool prefixed = true) {
233 if (prefixed && val[0] != TypeEncoder::encode_type<T>()) {
234 return false;
235 }
236 auto s = (val.size() - (prefixed ? 1 : 0)) / sizeof(typename T::value_type);
237 t.resize(s);
238 memcpy(t.data(), val.data() + (prefixed ? 1 : 0), s * sizeof(typename T::value_type));
239 return true;
240 }
241
242 template <typename T, typename std::enable_if<is_contiguous_container<T>::value && is_contiguous_container<typename T::value_type>::value, int>::type = 0>
243 bool deserialize(IfcParse::impl::rocks_db_file_storage* storage, const std::string& val, T& t) {

Callers 2

read_schemaMethod · 0.85
dispatch_get_Function · 0.85

Calls 4

resizeMethod · 0.80
dataMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected