Constructor. ! \param is input stream to be wrapped. \param type UTF encoding type if it is not detected from the stream. */
| 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_; } |
nothing calls this directly
no outgoing calls
no test coverage detected