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

Method writeKey

Fleece/Core/Encoder.cc:611–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609 }
610
611 void Encoder::writeKey(slice s) {
612 int encoded;
613 if (_sharedKeys && _sharedKeys->encodeAndAdd(s, encoded)) {
614 writeKey(encoded);
615 return;
616 }
617 addingKey();
618 const void* writtenKey = _writeString(s);
619 if (!writtenKey && _copyingCollection)
620 writtenKey = s.buf; // Workaround for written strings not being kept in memory by the Writer if it's writing to a file
621 addedKey({writtenKey, s.size});
622 }
623
624 void Encoder::writeKey(int n) {
625 assert_precondition(_sharedKeys || n == Dict::kMagicParentKey || gDisableNecessarySharedKeysCheck);

Callers 5

encodeToMethod · 0.45
writeToMethod · 0.45
popMethod · 0.45
writePathMethod · 0.45
_patchDictMethod · 0.45

Calls 8

encodeAndAddMethod · 0.80
isUnknownKeyMethod · 0.80
decodeMethod · 0.80
sharedMethod · 0.80
isIntegerMethod · 0.45
asIntMethod · 0.45
sharedKeysMethod · 0.45
asStringMethod · 0.45

Tested by

no test coverage detected