ASCII encoding.
More...
#include <encodings.h>
|
template<typename OutputStream > |
static void | Encode (OutputStream &os, unsigned codepoint) |
|
template<typename InputStream > |
static bool | Decode (InputStream &is, unsigned *codepoint) |
|
template<typename InputStream , typename OutputStream > |
static bool | Validate (InputStream &is, OutputStream &os) |
|
template<typename InputByteStream > |
static CharType | TakeBOM (InputByteStream &is) |
|
template<typename InputByteStream > |
static Ch | Take (InputByteStream &is) |
|
template<typename OutputByteStream > |
static void | PutBOM (OutputByteStream &os) |
|
template<typename OutputByteStream > |
static void | Put (OutputByteStream &os, Ch c) |
|
template<typename CharType = char>
struct ASCII< CharType >
ASCII encoding.
http://en.wikipedia.org/wiki/ASCII
- Template Parameters
-
CharType | Code unit for storing 7-bit ASCII data. Default is char. |
- Note
- implements Encoding concept
template<typename CharType = char>
typedef CharType ASCII< CharType >::Ch |
template<typename CharType = char>
Definition: encodings.h:486
template<typename CharType = char>
template<typename InputStream >
static bool ASCII< CharType >::Decode |
( |
InputStream & |
is, |
|
|
unsigned * |
codepoint |
|
) |
| |
|
inlinestatic |
496 unsigned char c =
static_cast<unsigned char>(is.Take());
template<typename CharType = char>
template<typename OutputStream >
static void ASCII< CharType >::Encode |
( |
OutputStream & |
os, |
|
|
unsigned |
codepoint |
|
) |
| |
|
inlinestatic |
491 os.Put(static_cast<Ch>(codepoint & 0xFF));
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:344
template<typename CharType = char>
template<typename OutputByteStream >
static void ASCII< CharType >::Put |
( |
OutputByteStream & |
os, |
|
|
Ch |
c |
|
) |
| |
|
inlinestatic |
530 os.Put(static_cast<typename OutputByteStream::Ch>(c));
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition: rapidjson.h:375
template<typename CharType = char>
template<typename OutputByteStream >
static void ASCII< CharType >::PutBOM |
( |
OutputByteStream & |
os | ) |
|
|
inlinestatic |
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition: rapidjson.h:375
template<typename CharType = char>
template<typename InputByteStream >
static Ch ASCII< CharType >::Take |
( |
InputByteStream & |
is | ) |
|
|
inlinestatic |
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition: rapidjson.h:375
template<typename CharType = char>
template<typename InputByteStream >
static CharType ASCII< CharType >::TakeBOM |
( |
InputByteStream & |
is | ) |
|
|
inlinestatic |
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
Definition: rapidjson.h:375
static Ch Take(InputByteStream &is)
Definition: encodings.h:516
CharType Ch
Definition: encodings.h:484
template<typename CharType = char>
template<typename InputStream , typename OutputStream >
static bool ASCII< CharType >::Validate |
( |
InputStream & |
is, |
|
|
OutputStream & |
os |
|
) |
| |
|
inlinestatic |
503 unsigned char c = is.Take();
The documentation for this struct was generated from the following file: