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

Class keyref

API/fleece/Fleece.hh:504–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502 Encoder& operator<< (Value v) {writeValue(v); return *this;}
503
504 class keyref {
505 public:
506 keyref(Encoder &enc, slice key) :_enc(enc), _key(key) { }
507 template <class T>
508 inline void operator= (T value) {_enc.writeKey(_key); _enc << value;}
509 private:
510 Encoder &_enc;
511 slice _key;
512 };
513
514 // This enables e.g. `enc["key"_sl] = 17`
515 inline keyref operator[] (slice_NONNULL key) {return keyref(*this, key);}

Callers 1

operator[]Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected