NGL
6.5
The NCCA Graphics Library
|
Input stream wrapper with dynamically bound encoding and automatic encoding detection. More...
#include <encodedstream.h>
Public Types | |
typedef CharType | Ch |
Public Member Functions | |
AutoUTFInputStream (InputByteStream &is, UTFType type=kUTF8) | |
Constructor. More... | |
UTFType | GetType () const |
bool | HasBOM () const |
Ch | Peek () const |
Ch | Take () |
size_t | Tell () const |
void | Put (Ch) |
void | Flush () |
Ch * | PutBegin () |
size_t | PutEnd (Ch *) |
Private Types | |
typedef Ch(* | TakeFunc) (InputByteStream &is) |
Private Member Functions | |
RAPIDJSON_STATIC_ASSERT (sizeof(typename InputByteStream::Ch)==1) | |
AutoUTFInputStream (const AutoUTFInputStream &) | |
AutoUTFInputStream & | operator= (const AutoUTFInputStream &) |
void | DetectType () |
Private Attributes | |
InputByteStream * | is_ |
UTFType | type_ |
Ch | current_ |
TakeFunc | takeFunc_ |
bool | hasBOM_ |
Input stream wrapper with dynamically bound encoding and automatic encoding detection.
CharType | Type of character for reading. |
InputByteStream | type of input byte stream to be wrapped. |
Definition at line 101 of file encodedstream.h.
typedef CharType AutoUTFInputStream< CharType, InputByteStream >::Ch |
Definition at line 104 of file encodedstream.h.
|
private |
Definition at line 185 of file encodedstream.h.
|
inline |
Constructor.
is | input stream to be wrapped. |
type | UTF encoding type if it is not detected from the stream. |
Definition at line 111 of file encodedstream.h.
References EncodedInputStream< Encoding, InputByteStream >::current_, EncodedInputStream< Encoding, InputByteStream >::is_, kUTF32BE, kUTF8, RAPIDJSON_ASSERT, RAPIDJSON_ENCODINGS_FUNC, and EncodedInputStream< Encoding, InputByteStream >::Take().
|
private |
|
inlineprivate |
Definition at line 137 of file encodedstream.h.
References EncodedInputStream< Encoding, InputByteStream >::is_, kUTF16BE, kUTF16LE, kUTF32BE, kUTF32LE, kUTF8, and RAPIDJSON_ASSERT.
|
inline |
Definition at line 128 of file encodedstream.h.
References RAPIDJSON_ASSERT.
|
inline |
Definition at line 119 of file encodedstream.h.
|
inline |
Definition at line 120 of file encodedstream.h.
|
private |
|
inline |
Definition at line 122 of file encodedstream.h.
References EncodedInputStream< Encoding, InputByteStream >::current_.
|
inline |
Definition at line 127 of file encodedstream.h.
References RAPIDJSON_ASSERT.
|
inline |
Definition at line 129 of file encodedstream.h.
References RAPIDJSON_ASSERT.
|
inline |
Definition at line 130 of file encodedstream.h.
References EncodedInputStream< Encoding, InputByteStream >::operator=(), and RAPIDJSON_ASSERT.
|
private |
|
inline |
Definition at line 123 of file encodedstream.h.
References EncodedInputStream< Encoding, InputByteStream >::current_, and EncodedInputStream< Encoding, InputByteStream >::is_.
|
inline |
Definition at line 124 of file encodedstream.h.
References EncodedInputStream< Encoding, InputByteStream >::is_.
|
private |
Definition at line 188 of file encodedstream.h.
|
private |
Definition at line 190 of file encodedstream.h.
|
private |
Definition at line 186 of file encodedstream.h.
|
private |
Definition at line 189 of file encodedstream.h.
|
private |
Definition at line 187 of file encodedstream.h.