15 #ifndef RAPIDJSON_ISTREAMWRAPPER_H_ 16 #define RAPIDJSON_ISTREAMWRAPPER_H_ 23 RAPIDJSON_DIAG_OFF(padded)
24 #elif defined(_MSC_VER) 26 RAPIDJSON_DIAG_OFF(4351)
47 template <
typename StreamType>
50 typedef typename StreamType::char_type
Ch;
54 typename StreamType::int_type
c =
stream_.peek();
55 return RAPIDJSON_LIKELY(c != StreamType::traits_type::eof()) ?
static_cast<Ch
>(
c) : static_cast<Ch>(
'\0');
59 typename StreamType::int_type
c =
stream_.get();
62 return static_cast<Ch
>(
c);
80 bool hasError =
false;
81 for (i = 0; i < 4; ++i) {
82 typename StreamType::int_type
c =
stream_.get();
83 if (c == StreamType::traits_type::eof()) {
90 for (--i; i >= 0; --i)
107 #if defined(__clang__) || defined(_MSC_VER) 113 #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 &)