MCPcopy Create free account
hub / github.com/couchbase/fleece / iterateContainer

Method iterateContainer

Fleece/Core/DeepIterator.cc:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 bool DeepIterator::iterateContainer(const Value *container) {
84 _container = container;
85 _stack.push_front({{nullslice, 0}, nullptr}); // Push en end-of-level marker first
86 auto type = container->type();
87 if (type == kArray) {
88 _arrayIt.reset( new Array::iterator(container->asArray()) );
89 _arrayIndex = 0;
90 return true;
91 } else if (type == kDict) {
92 _dictIt.reset( new Dict::iterator(container->asDict(), _sk) );
93 return true;
94 } else {
95 return false;
96 }
97 }
98
99 void DeepIterator::queueChildren() {
100 auto type = _value->type();

Callers

nothing calls this directly

Calls 4

typeMethod · 0.45
resetMethod · 0.45
asArrayMethod · 0.45
asDictMethod · 0.45

Tested by

no test coverage detected