/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/rapidjson/encodedstream.h Source File#
encodedstream.h
Go to the documentation of this file.
127 #define RAPIDJSON_ENCODINGS_FUNC(x) UTF8<Ch>::x, UTF16LE<Ch>::x, UTF16BE<Ch>::x, UTF32LE<Ch>::x, UTF32BE<Ch>::x
145 AutoUTFInputStream(InputByteStream& is, UTFType type = kUTF8) : is_(&is), type_(type), hasBOM_(false) {
185 if (bom == 0xFFFE0000) { type_ = kUTF32BE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }
186 else if (bom == 0x0000FEFF) { type_ = kUTF32LE; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); is_->Take(); }
187 else if ((bom & 0xFFFF) == 0xFFFE) { type_ = kUTF16BE; hasBOM_ = true; is_->Take(); is_->Take(); }
188 else if ((bom & 0xFFFF) == 0xFEFF) { type_ = kUTF16LE; hasBOM_ = true; is_->Take(); is_->Take(); }
189 else if ((bom & 0xFFFFFF) == 0xBFBBEF) { type_ = kUTF8; hasBOM_ = true; is_->Take(); is_->Take(); is_->Take(); }
214 // Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
247 // Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
Input stream wrapper with dynamically bound encoding and automatic encoding detection.
Definition: encodedstream.h:135
AutoUTFInputStream(InputByteStream &is, UTFType type=kUTF8)
Constructor.
Definition: encodedstream.h:145
Output stream wrapper with dynamically bound encoding and automatic encoding detection.
Definition: encodedstream.h:233
AutoUTFOutputStream(OutputByteStream &os, UTFType type, bool putBOM)
Constructor.
Definition: encodedstream.h:244
EncodedInputStream(MemoryStream &is)
Definition: encodedstream.h:72
Input byte stream wrapper with a statically bound encoding.
Definition: encodedstream.h:39
EncodedInputStream(InputByteStream &is)
Definition: encodedstream.h:44
Output byte stream wrapper with statically bound encoding.
Definition: encodedstream.h:100
EncodedOutputStream(OutputByteStream &os, bool putBOM=true)
Definition: encodedstream.h:105
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:121
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:124