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

Method Write

include/dmlc/json.h:410–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408template<typename ContainerType>
409struct ArrayHandler {
410 inline static void Write(JSONWriter *writer, const ContainerType &array) {
411 typedef typename ContainerType::value_type ElemType;
412 writer->BeginArray(array.size() > 10 || !dmlc::is_pod<ElemType>::value);
413 for (typename ContainerType::const_iterator it = array.begin();
414 it != array.end(); ++it) {
415 writer->WriteArrayItem(*it);
416 }
417 writer->EndArray();
418 }
419 inline static void Read(JSONReader *reader, ContainerType *array) {
420 typedef typename ContainerType::value_type ElemType;
421 array->clear();

Callers

nothing calls this directly

Calls 4

WriteArrayItemMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected