MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / begin_map

Method begin_map

dds/DCPS/Xcdr2ValueWriter.cpp:364–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364bool Xcdr2ValueWriter::begin_map(XTypes::TypeKind key_kind, XTypes::TypeKind value_kind)
365{
366 DDS::UInt32 len = 0;
367 if (mode_ == SERIALIZATION_SIZE_MODE) {
368 map_lengths_.push_back(0u);
369 map_lengths_index_.push(map_lengths_.size() - 1);
370 } else if (!map_lengths_.empty()) {
371 len = map_lengths_.front();
372 map_lengths_.pop_front();
373 }
374 const bool primitive = XTypes::is_primitive(key_kind) && XTypes::is_primitive(value_kind);
375 return begin_complex(primitive ? FINAL : APPENDABLE, MAP_KIND, len);
376}
377
378bool Xcdr2ValueWriter::end_map()
379{

Callers

nothing calls this directly

Calls 5

is_primitiveFunction · 0.85
pop_frontMethod · 0.80
pushMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected