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

Method Write

include/dmlc/json.h:433–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431template<typename ContainerType>
432struct MapHandler{
433 inline static void Write(JSONWriter *writer, const ContainerType &map) {
434 writer->BeginObject(map.size() > 1);
435 for (typename ContainerType::const_iterator it = map.begin(); it != map.end(); ++it) {
436 writer->WriteObjectKeyValue(it->first, it->second);
437 }
438 writer->EndObject();
439 }
440 inline static void Read(JSONReader *reader, ContainerType *map) {
441 typedef typename ContainerType::mapped_type ElemType;
442 map->clear();

Callers

nothing calls this directly

Calls 4

WriteObjectKeyValueMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected