Lines Matching refs:Obj

29 Expected<bool> Reader::read(Object &Obj) {  in read()  argument
37 Obj.Kind = Type::Nil; in read()
40 Obj.Kind = Type::Boolean; in read()
41 Obj.Bool = true; in read()
44 Obj.Kind = Type::Boolean; in read()
45 Obj.Bool = false; in read()
48 Obj.Kind = Type::Int; in read()
49 return readInt<int8_t>(Obj); in read()
51 Obj.Kind = Type::Int; in read()
52 return readInt<int16_t>(Obj); in read()
54 Obj.Kind = Type::Int; in read()
55 return readInt<int32_t>(Obj); in read()
57 Obj.Kind = Type::Int; in read()
58 return readInt<int64_t>(Obj); in read()
60 Obj.Kind = Type::UInt; in read()
61 return readUInt<uint8_t>(Obj); in read()
63 Obj.Kind = Type::UInt; in read()
64 return readUInt<uint16_t>(Obj); in read()
66 Obj.Kind = Type::UInt; in read()
67 return readUInt<uint32_t>(Obj); in read()
69 Obj.Kind = Type::UInt; in read()
70 return readUInt<uint64_t>(Obj); in read()
72 Obj.Kind = Type::Float; in read()
77 Obj.Float = BitsToFloat(endian::read<uint32_t, Endianness>(Current)); in read()
81 Obj.Kind = Type::Float; in read()
86 Obj.Float = BitsToDouble(endian::read<uint64_t, Endianness>(Current)); in read()
90 Obj.Kind = Type::String; in read()
91 return readRaw<uint8_t>(Obj); in read()
93 Obj.Kind = Type::String; in read()
94 return readRaw<uint16_t>(Obj); in read()
96 Obj.Kind = Type::String; in read()
97 return readRaw<uint32_t>(Obj); in read()
99 Obj.Kind = Type::Binary; in read()
100 return readRaw<uint8_t>(Obj); in read()
102 Obj.Kind = Type::Binary; in read()
103 return readRaw<uint16_t>(Obj); in read()
105 Obj.Kind = Type::Binary; in read()
106 return readRaw<uint32_t>(Obj); in read()
108 Obj.Kind = Type::Array; in read()
109 return readLength<uint16_t>(Obj); in read()
111 Obj.Kind = Type::Array; in read()
112 return readLength<uint32_t>(Obj); in read()
114 Obj.Kind = Type::Map; in read()
115 return readLength<uint16_t>(Obj); in read()
117 Obj.Kind = Type::Map; in read()
118 return readLength<uint32_t>(Obj); in read()
120 Obj.Kind = Type::Extension; in read()
121 return createExt(Obj, FixLen::Ext1); in read()
123 Obj.Kind = Type::Extension; in read()
124 return createExt(Obj, FixLen::Ext2); in read()
126 Obj.Kind = Type::Extension; in read()
127 return createExt(Obj, FixLen::Ext4); in read()
129 Obj.Kind = Type::Extension; in read()
130 return createExt(Obj, FixLen::Ext8); in read()
132 Obj.Kind = Type::Extension; in read()
133 return createExt(Obj, FixLen::Ext16); in read()
135 Obj.Kind = Type::Extension; in read()
136 return readExt<uint8_t>(Obj); in read()
138 Obj.Kind = Type::Extension; in read()
139 return readExt<uint16_t>(Obj); in read()
141 Obj.Kind = Type::Extension; in read()
142 return readExt<uint32_t>(Obj); in read()
146 Obj.Kind = Type::Int; in read()
150 Obj.Int = I; in read()
155 Obj.Kind = Type::UInt; in read()
156 Obj.UInt = FB; in read()
161 Obj.Kind = Type::String; in read()
163 return createRaw(Obj, Size); in read()
167 Obj.Kind = Type::Array; in read()
168 Obj.Length = FB & ~FixBitsMask::Array; in read()
173 Obj.Kind = Type::Map; in read()
174 Obj.Length = FB & ~FixBitsMask::Map; in read()
182 template <class T> Expected<bool> Reader::readRaw(Object &Obj) { in readRaw() argument
189 return createRaw(Obj, Size); in readRaw()
192 template <class T> Expected<bool> Reader::readInt(Object &Obj) { in readInt() argument
197 Obj.Int = static_cast<int64_t>(endian::read<T, Endianness>(Current)); in readInt()
202 template <class T> Expected<bool> Reader::readUInt(Object &Obj) { in readUInt() argument
207 Obj.UInt = static_cast<uint64_t>(endian::read<T, Endianness>(Current)); in readUInt()
212 template <class T> Expected<bool> Reader::readLength(Object &Obj) { in readLength() argument
217 Obj.Length = static_cast<size_t>(endian::read<T, Endianness>(Current)); in readLength()
222 template <class T> Expected<bool> Reader::readExt(Object &Obj) { in readExt() argument
229 return createExt(Obj, Size); in readExt()
232 Expected<bool> Reader::createRaw(Object &Obj, uint32_t Size) { in createRaw() argument
237 Obj.Raw = StringRef(Current, Size); in createRaw()
242 Expected<bool> Reader::createExt(Object &Obj, uint32_t Size) { in createExt() argument
247 Obj.Extension.Type = *Current++; in createExt()
252 Obj.Extension.Bytes = StringRef(Current, Size); in createExt()