MCPcopy Create free account
hub / github.com/Kitware/CMake / serializeFields

Method serializeFields

Utilities/cmcppdap/include/dap/typeof.h:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 return true; \
176 } \
177 bool TypeOf<STRUCT>::serializeFields(FieldSerializer* fs, const void* obj) {\
178 using StructTy = STRUCT; \
179 (void)sizeof(StructTy); /* avoid unused 'using' warning */ \
180 for (auto& field : std::initializer_list<Field>{__VA_ARGS__}) { \
181 if (!fs->field(field.name, [&](Serializer* s) { \
182 auto ptr = reinterpret_cast<const uint8_t*>(obj) + field.offset; \
183 return field.type->serialize(s, ptr); \
184 })) { \
185 return false; \
186 } \
187 } \
188 return true; \
189 }
190
191// DAP_IMPLEMENT_STRUCT_TYPEINFO() implements the type() member function for the
192// TypeOf<> specialization for STRUCT.

Callers

nothing calls this directly

Calls 2

fieldMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected