ASCII encoding.
More...
#include <encodings.h>
|
| template<typename OutputStream> |
| static void | Encode (OutputStream &os, unsigned codepoint) |
| template<typename OutputStream> |
| static void | EncodeUnsafe (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
Definition at line 542 of file encodings.h.
◆ Ch
template<typename CharType = char>
| typedef CharType ASCII< CharType >::Ch |
◆ anonymous enum
template<typename CharType = char>
◆ Decode()
template<typename CharType = char>
template<typename InputStream>
| bool ASCII< CharType >::Decode |
( |
InputStream & | is, |
|
|
unsigned * | codepoint ) |
|
inlinestatic |
Definition at line 560 of file encodings.h.
560 {
564 }
static Ch Take(InputByteStream &is)
◆ Encode()
template<typename CharType = char>
template<typename OutputStream>
| void ASCII< CharType >::Encode |
( |
OutputStream & | os, |
|
|
unsigned | codepoint ) |
|
inlinestatic |
Definition at line 548 of file encodings.h.
548 {
551 }
#define RAPIDJSON_ASSERT(x)
Assertion.
static void Put(OutputByteStream &os, Ch c)
◆ EncodeUnsafe()
template<typename CharType = char>
template<typename OutputStream>
| void ASCII< CharType >::EncodeUnsafe |
( |
OutputStream & | os, |
|
|
unsigned | codepoint ) |
|
inlinestatic |
Definition at line 554 of file encodings.h.
554 {
557 }
void PutUnsafe(Stream &stream, typename Stream::Ch c)
Write character to a stream, presuming buffer is reserved.
◆ Put()
template<typename CharType = char>
template<typename OutputByteStream>
| void ASCII< CharType >::Put |
( |
OutputByteStream & | os, |
|
|
Ch | c ) |
|
inlinestatic |
Definition at line 593 of file encodings.h.
593 {
596 }
#define RAPIDJSON_STATIC_ASSERT(x)
(Internal) macro to check for conditions at compile-time
◆ PutBOM()
template<typename CharType = char>
template<typename OutputByteStream>
| void ASCII< CharType >::PutBOM |
( |
OutputByteStream & | os | ) |
|
|
inlinestatic |
◆ Take()
template<typename CharType = char>
template<typename InputByteStream>
| Ch ASCII< CharType >::Take |
( |
InputByteStream & | is | ) |
|
|
inlinestatic |
◆ TakeBOM()
template<typename CharType = char>
template<typename InputByteStream>
| CharType ASCII< CharType >::TakeBOM |
( |
InputByteStream & | is | ) |
|
|
inlinestatic |
Definition at line 574 of file encodings.h.
574 {
577 return static_cast<Ch>(
c);
578 }
◆ Validate()
template<typename CharType = char>
template<typename InputStream, typename OutputStream>
| bool ASCII< CharType >::Validate |
( |
InputStream & | is, |
|
|
OutputStream & | os ) |
|
inlinestatic |
The documentation for this struct was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/rapidjson/include/rapidjson/encodings.h