MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / Write

Method Write

include/dmlc/serializer.h:175–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173template<typename T>
174struct NativePODStringHandler {
175 inline static void Write(Stream *strm, const std::basic_string<T> &vec) {
176 uint64_t sz = static_cast<uint64_t>(vec.length());
177 strm->Write<uint64_t>(sz);
178 if (sz != 0) {
179 strm->Write(&vec[0], sizeof(T) * vec.length());
180 }
181 }
182 inline static bool Read(Stream *strm, std::basic_string<T> *out_vec) {
183 uint64_t sz;
184 if (!strm->Read<uint64_t>(&sz)) return false;

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected