MCPcopy Create free account
hub / github.com/bgrimstad/splinter / serialize

Method serialize

include/serializer.h:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135
136template <class T>
137void Serializer::serialize(const T &obj)
138{
139 // We can't set write to stream.end() here because the call
140 // to stream.resize() below may invalidate iterators
141 int writeIndex = stream.size();
142
143 // Increase the size of the stream so it can hold the object
144 stream.resize(stream.size() + get_size(obj));
145
146 write = stream.begin() + writeIndex;
147
148 _serialize(obj);
149}
150
151template <class T>
152void Serializer::_serialize(const T &obj)

Callers 3

eigentypes.cppFile · 0.80
saveMethod · 0.80
saveMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected