MCPcopy Create free account
hub / github.com/comaps/comaps / Write

Method Write

generator/intermediate_data.hpp:211–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210 template <typename Value>
211 void Write(Key id, Value const & value)
212 {
213 m_offsets.Add(id, m_fileWriter.Pos());
214 m_data.clear();
215 MemWriter<decltype(m_data)> w(m_data);
216
217 value.Write(w);
218
219 ASSERT_LESS(m_data.size(), std::numeric_limits<uint32_t>::max(), ());
220 uint32_t sz = static_cast<uint32_t>(m_data.size());
221 m_fileWriter.Write(&sz, sizeof(sz));
222 m_fileWriter.Write(m_data.data(), sz);
223 }
224
225 void SaveOffsets();
226

Callers 1

AddWayMethod · 0.45

Calls 5

AddMethod · 0.45
PosMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected