BasicIStreamWrapper
Engine/source/persistence/rapidjson/istreamwrapper.h
Wrapper of
std::basic_istreaminto RapidJSON's Stream concept.
Public Types
StreamType::char_type
Ch
Private Attributes
Public Functions
Private Functions
Detailed Description
Wrapper of
std::basic_istreaminto RapidJSON's Stream concept.
The classes can be wrapped including but not limited to:
std::istringstream
std::stringstream
std::wistringstream
std::wstringstream
std::ifstream
std::fstream
std::wifstream
std::wfstream
Parameters:
StreamType | Class derived from std::basic_istream. |
Public Types
typedef StreamType::char_type Ch
Private Attributes
Ch * buffer_
Ch * bufferLast_
size_t bufferSize_
size_t count_
Number of characters read.
Ch * current_
bool eof_
Ch peekBuffer_ [4]
size_t readCount_
StreamType & stream_
Public Functions
BasicIStreamWrapper(StreamType & stream)
Constructor.
Parameters:
stream | stream opened for read. |
BasicIStreamWrapper(StreamType & stream, char * buffer, size_t bufferSize)
Constructor.
Parameters:
stream | stream opened for read. |
buffer | user-supplied buffer. |
bufferSize | size of buffer in bytes. Must >=4 bytes. |
Flush()
Peek()
Peek4()
Put(Ch )
PutBegin()
PutEnd(Ch * )
Take()
Tell()
Private Functions
BasicIStreamWrapper()
BasicIStreamWrapper(const BasicIStreamWrapper & )
operator=(const BasicIStreamWrapper & )
Read()