Lines Matching refs:ksiz

64     virtual const char* visit_full(const char* kbuf, size_t ksiz,  in visit_full()  argument
66 _assert_(kbuf && ksiz <= MEMMAXSIZ && vbuf && vsiz <= MEMMAXSIZ && sp); in visit_full()
78 virtual const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in visit_empty() argument
79 _assert_(kbuf && ksiz <= MEMMAXSIZ && sp); in visit_empty()
209 virtual bool jump(const char* kbuf, size_t ksiz) = 0;
230 virtual bool jump_back(const char* kbuf, size_t ksiz) = 0;
272 virtual bool accept(const char* kbuf, size_t ksiz, Visitor* visitor, bool writable = true) = 0;
283 virtual bool set(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) = 0;
299 virtual bool add(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) = 0;
315 virtual bool replace(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) = 0;
331 virtual bool append(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) = 0;
349 virtual int64_t increment(const char* kbuf, size_t ksiz, int64_t num, int64_t orig = 0) = 0;
367 virtual double increment_double(const char* kbuf, size_t ksiz, double num,
385 virtual bool cas(const char* kbuf, size_t ksiz,
400 virtual bool remove(const char* kbuf, size_t ksiz) = 0;
419 virtual char* get(const char* kbuf, size_t ksiz, size_t* sp) = 0;
436 virtual int32_t get(const char* kbuf, size_t ksiz, char* vbuf, size_t max) = 0;
443 virtual int32_t check(const char* kbuf, size_t ksiz) = 0;
537 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
576 const char* visit_full(const char* kbuf, size_t ksiz, in remove()
613 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
615 kbuf_ = new char[ksiz+1]; in visit_full()
616 std::memcpy(kbuf_, kbuf, ksiz); in visit_full()
617 kbuf_[ksiz] = '\0'; in visit_full()
618 ksiz_ = ksiz; in visit_full()
630 size_t ksiz; variable
631 char* kbuf = visitor.pop(&ksiz);
636 *sp = ksiz;
646 size_t ksiz; variable
647 char* kbuf = get_key(&ksiz, step);
650 key->append(kbuf, ksiz);
679 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
750 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
752 size_t rsiz = ksiz + 1 + vsiz + 1; in visit_full()
754 std::memcpy(kbuf_, kbuf, ksiz); in visit_full()
755 kbuf_[ksiz] = '\0'; in visit_full()
756 ksiz_ = ksiz; in visit_full()
757 vbuf_ = kbuf_ + ksiz + 1; in visit_full()
793 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
796 key_->append(kbuf, ksiz); in visit_full()
839 const char* visit_full(const char* kbuf, size_t ksiz, in seize()
841 size_t rsiz = ksiz + 1 + vsiz + 1; in seize()
843 std::memcpy(kbuf_, kbuf, ksiz); in seize()
844 kbuf_[ksiz] = '\0'; in seize()
845 ksiz_ = ksiz; in seize()
846 vbuf_ = kbuf_ + ksiz + 1; in seize()
882 const char* visit_full(const char* kbuf, size_t ksiz, in seize()
885 key_->append(kbuf, ksiz); in seize()
1424 bool set(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) { in set() argument
1425 _assert_(kbuf && ksiz <= MEMMAXSIZ && vbuf && vsiz <= MEMMAXSIZ); in set()
1430 const char* visit_full(const char* kbuf, size_t ksiz, in set()
1435 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in set()
1443 if (!accept(kbuf, ksiz, &visitor, true)) return false; in set()
1464 bool add(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) { in add() argument
1465 _assert_(kbuf && ksiz <= MEMMAXSIZ && vbuf && vsiz <= MEMMAXSIZ); in add()
1474 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in add()
1484 if (!accept(kbuf, ksiz, &visitor, true)) return false; in add()
1509 bool replace(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) { in replace() argument
1510 _assert_(kbuf && ksiz <= MEMMAXSIZ && vbuf && vsiz <= MEMMAXSIZ); in replace()
1519 const char* visit_full(const char* kbuf, size_t ksiz, in replace()
1530 if (!accept(kbuf, ksiz, &visitor, true)) return false; in replace()
1555 bool append(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) { in append() argument
1556 _assert_(kbuf && ksiz <= MEMMAXSIZ && vbuf && vsiz <= MEMMAXSIZ); in append()
1565 const char* visit_full(const char* kbuf, size_t ksiz, in append()
1574 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in append()
1583 if (!accept(kbuf, ksiz, &visitor, true)) return false; in append()
1606 int64_t increment(const char* kbuf, size_t ksiz, int64_t num, int64_t orig = 0) {
1607 _assert_(kbuf && ksiz <= MEMMAXSIZ);
1615 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
1637 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in visit_empty() argument
1652 if (!accept(kbuf, ksiz, &visitor, num != 0 || orig != INT64MIN)) return INT64MIN;
1680 double increment_double(const char* kbuf, size_t ksiz, double num, double orig = 0) {
1681 _assert_(kbuf && ksiz <= MEMMAXSIZ);
1690 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
1746 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in visit_empty() argument
1778 if (!accept(kbuf, ksiz, &visitor, true)) return nan();
1805 bool cas(const char* kbuf, size_t ksiz, in cas() argument
1807 _assert_(kbuf && ksiz <= MEMMAXSIZ); in cas()
1816 const char* visit_full(const char* kbuf, size_t ksiz, in cas()
1824 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in cas()
1838 if (!accept(kbuf, ksiz, &visitor, true)) return false; in cas()
1862 bool remove(const char* kbuf, size_t ksiz) { in remove() argument
1863 _assert_(kbuf && ksiz <= MEMMAXSIZ); in remove()
1871 const char* visit_full(const char* kbuf, size_t ksiz, in remove()
1879 if (!accept(kbuf, ksiz, &visitor, true)) return false; in remove()
1907 char* get(const char* kbuf, size_t ksiz, size_t* sp) { in get() argument
1908 _assert_(kbuf && ksiz <= MEMMAXSIZ && sp); in get()
1917 const char* visit_full(const char* kbuf, size_t ksiz, in get()
1929 if (!accept(kbuf, ksiz, &visitor, false)) { in get()
1958 const char* visit_full(const char* kbuf, size_t ksiz, in get()
1985 int32_t get(const char* kbuf, size_t ksiz, char* vbuf, size_t max) { in get() argument
1986 _assert_(kbuf && ksiz <= MEMMAXSIZ && vbuf); in get()
1994 const char* visit_full(const char* kbuf, size_t ksiz, in get()
2006 if (!accept(kbuf, ksiz, &visitor, false)) return -1; in get()
2020 int32_t check(const char* kbuf, size_t ksiz) { in check() argument
2028 const char* visit_full(const char* kbuf, size_t ksiz, in check()
2036 if (!accept(kbuf, ksiz, &visitor, false)) return -1; in check()
2064 char* seize(const char* kbuf, size_t ksiz, size_t* sp) { in seize() argument
2065 _assert_(kbuf && ksiz <= MEMMAXSIZ && sp); in seize()
2074 const char* visit_full(const char* kbuf, size_t ksiz, in seize()
2086 if (!accept(kbuf, ksiz, &visitor, true)) { in seize()
2115 const char* visit_full(const char* kbuf, size_t ksiz, in seize()
2154 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
2157 recs_.find(std::string(kbuf, ksiz)); in visit_full()
2162 const char* visit_empty(const char* kbuf, size_t ksiz, size_t* sp) { in visit_empty() argument
2164 recs_.find(std::string(kbuf, ksiz)); in visit_empty()
2200 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
2239 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
2241 (*recs_)[std::string(kbuf, ksiz)] = std::string(vbuf, vsiz); in visit_full()
2281 const char* visit_full(const char* kbuf, size_t ksiz, in visit_full() argument
2285 wp += writevarnum(wp, ksiz); in visit_full()
2288 dest_->write(kbuf, ksiz); in visit_full()
2370 size_t ksiz = 0; variable
2373 ksiz = (ksiz << 7) + (c & 0x7f);
2380 size_t rsiz = ksiz + vsiz;
2382 src->read(rbuf, ksiz + vsiz);
2389 if (!set(rbuf, ksiz, rbuf + ksiz, vsiz)) {