MCPcopy Create free account
hub / github.com/Tencent/rapidjson / AutoUTFInputStream

Method AutoUTFInputStream

include/rapidjson/encodedstream.h:145–151  ·  view source on GitHub ↗

Constructor. ! \param is input stream to be wrapped. \param type UTF encoding type if it is not detected from the stream. */

Source from the content-addressed store, hash-verified

143 \param type UTF encoding type if it is not detected from the stream.
144 */
145 AutoUTFInputStream(InputByteStream& is, UTFType type = kUTF8) : is_(&is), type_(type), hasBOM_(false) {
146 RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);
147 DetectType();
148 static const TakeFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Take) };
149 takeFunc_ = f[type_];
150 current_ = takeFunc_(*is_);
151 }
152
153 UTFType GetType() const { return type_; }
154 bool HasBOM() const { return hasBOM_; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected