15 #ifndef RAPIDJSON_ISTREAMWRAPPER_H_ 16 #define RAPIDJSON_ISTREAMWRAPPER_H_ 23 RAPIDJSON_DIAG_OFF(padded)
28 RAPIDJSON_DIAG_OFF(4351)
49 template <
typename StreamType>
52 typedef typename StreamType::char_type
Ch;
56 typename StreamType::int_type c =
stream_.peek();
57 return RAPIDJSON_LIKELY(c != StreamType::traits_type::eof()) ?
static_cast<Ch
>(c) : static_cast<Ch>(
'\0');
61 typename StreamType::int_type c =
stream_.get();
64 return static_cast<Ch
>(c);
82 bool hasError =
false;
83 for (i = 0; i < 4; ++i) {
84 typename StreamType::int_type c =
stream_.get();
85 if (c == StreamType::traits_type::eof()) {
92 for (--i; i >= 0; --i)
109 #if defined(__clang__) || defined(_MSC_VER) 115 #endif // RAPIDJSON_ISTREAMWRAPPER_H_ BasicIStreamWrapper< std::istream > IStreamWrapper
size_t count_
Number of characters read. Note:
#define RAPIDJSON_ASSERT(x)
Assertion.
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
BasicIStreamWrapper(StreamType &stream)
BasicIStreamWrapper< std::wistream > WIStreamWrapper
#define RAPIDJSON_LIKELY(x)
Compiler branching hint for expression with high probability to be true.
Wrapper of std::basic_istream into RapidJSON's Stream concept.
BasicIStreamWrapper & operator=(const BasicIStreamWrapper &)