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

Function serialize

src/ifcparse/IfcEntityInstanceData.h:181–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179
180 template <typename T, typename std::enable_if<is_contiguous_container<T>::value && !is_contiguous_container<typename T::value_type>::value, int>::type = 0>
181 bool serialize(std::string& val, const T& t) {
182 auto s = sizeof(typename T::value_type) * t.size();
183 val.resize(s + 1);
184 val[0] = TypeEncoder::encode_type<T>();
185 memcpy(val.data() + 1, t.data(), s);
186 return true;
187 }
188
189 template <typename T, typename std::enable_if<is_contiguous_container<T>::value&& is_contiguous_container<typename T::value_type>::value, int>::type = 0>
190 bool serialize(std::string& val, const T& t) {

Callers 2

operator()Method · 0.70
setMethod · 0.70

Calls 4

resizeMethod · 0.80
dataMethod · 0.80
substrMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected