MCPcopy Create free account
hub / github.com/Tencent/MMKV / CodedInputData

Class CodedInputData

Core/CodedInputData.h:33–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace mmkv {
32
33class CodedInputData {
34 uint8_t *const m_ptr;
35 size_t m_size;
36 size_t m_position;
37
38 int8_t readRawByte();
39
40 int32_t readRawVarint32();
41
42 int32_t readRawLittleEndian32();
43
44 int64_t readRawLittleEndian64();
45
46public:
47 CodedInputData(const void *oData, size_t length);
48
49 bool isAtEnd() const { return m_position == m_size; };
50
51 void seek(size_t addedSize);
52
53 bool readBool();
54
55 double readDouble();
56
57 float readFloat();
58
59 int64_t readInt64();
60
61 uint64_t readUInt64();
62
63 int32_t readInt32();
64
65 uint32_t readUInt32();
66
67 // exactly is like getValueSize(actualSize = true)
68 MMBuffer readData(bool copy = true, bool exactly = false);
69 void readData(KeyValueHolder &kvHolder);
70
71 static MMBuffer readRealData(mmkv::MMBuffer & data);
72
73 std::string readString();
74 void readString(std::string &s);
75 std::string readString(KeyValueHolder &kvHolder);
76#ifdef __OBJC__
77 NSString *readNSString();
78 NSString *readNSString(KeyValueHolder &kvHolder);
79 NSData *readNSData();
80#endif
81};
82
83} // namespace mmkv
84

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected