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
Definition: istreamwrapper.h:104
size_t count_
Number of characters read. Note:
Definition: istreamwrapper.h:100
const Ch * Peek4() const
Definition: istreamwrapper.h:77
Ch * PutBegin()
Definition: istreamwrapper.h:71
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:411
Ch Take()
Definition: istreamwrapper.h:58
int i
Definition: pymoduletest.py:23
Ch Peek() const
Definition: istreamwrapper.h:53
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:124
size_t PutEnd(Ch *)
Definition: istreamwrapper.h:74
StreamType & stream_
Definition: istreamwrapper.h:99
size_t Tell() const
Definition: istreamwrapper.h:69
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:121
BasicIStreamWrapper(StreamType &stream)
Definition: istreamwrapper.h:51
void Flush()
Definition: istreamwrapper.h:73
BasicIStreamWrapper< std::wistream > WIStreamWrapper
Definition: istreamwrapper.h:105
#define RAPIDJSON_LIKELY(x)
Compiler branching hint for expression with high probability to be true.
Definition: rapidjson.h:468
Wrapper of std::basic_istream into RapidJSON's Stream concept.
Definition: istreamwrapper.h:48
Ch peekBuffer_[4]
Definition: istreamwrapper.h:101
BasicIStreamWrapper & operator=(const BasicIStreamWrapper &)
void Put(Ch)
Definition: istreamwrapper.h:72
c
Definition: pymoduletest.py:79
StreamType::char_type Ch
Definition: istreamwrapper.h:50