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

Class CodedOutputData

Core/CodedOutputData.h:32–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace mmkv {
31
32class CodedOutputData {
33 uint8_t *const m_ptr;
34 size_t m_size;
35 size_t m_position;
36
37public:
38 CodedOutputData(void *ptr, size_t len);
39
40 size_t spaceLeft();
41
42 uint8_t *curWritePointer();
43
44 void seek(size_t addedSize);
45
46 void reset();
47
48 size_t getPosition();
49
50 void setPosition(size_t position);
51
52 void writeRawByte(uint8_t value);
53
54 void writeRawLittleEndian32(int32_t value);
55
56 void writeRawLittleEndian64(int64_t value);
57
58 void writeRawVarint32(int32_t value);
59
60 void writeRawVarint64(int64_t value);
61
62 void writeRawData(const MMBuffer &data);
63
64 void writeDouble(double value);
65
66 void writeFloat(float value);
67
68 void writeInt64(int64_t value);
69
70 void writeUInt64(uint64_t value);
71
72 void writeInt32(int32_t value);
73
74 void writeUInt32(uint32_t value);
75
76 void writeBool(bool value);
77
78 void writeData(const MMBuffer &value);
79
80 void writeString(const std::string &value);
81};
82
83} // namespace mmkv
84

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected