Torque3D Documentation / _generateds / BasicIStreamWrapper

BasicIStreamWrapper

Engine/source/persistence/rapidjson/istreamwrapper.h

Wrapper of

std::basic_istream
into RapidJSON's Stream concept.

More...

Public Types

StreamType::char_type
Ch 

Private Attributes

size_t
size_t

Number of characters read.

bool
size_t
StreamType &

Public Functions

BasicIStreamWrapper(StreamType & stream)

Constructor.

BasicIStreamWrapper(StreamType & stream, char * buffer, size_t bufferSize)

Constructor.

Peek()
size_t
PutEnd(Ch * )
Take()
size_t
Tell()

Detailed Description

Wrapper of

std::basic_istream
into 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()