Static Public Member Functions | List of all members
Transcoder< Encoding, Encoding > Struct Template Reference

Specialization of Transcoder with same source and target encoding. More...

#include <encodings.h>

Static Public Member Functions

template<typename InputStream , typename OutputStream >
static RAPIDJSON_FORCEINLINE bool Transcode (InputStream &is, OutputStream &os)
 
template<typename InputStream , typename OutputStream >
static RAPIDJSON_FORCEINLINE bool TranscodeUnsafe (InputStream &is, OutputStream &os)
 
template<typename InputStream , typename OutputStream >
static RAPIDJSON_FORCEINLINE bool Validate (InputStream &is, OutputStream &os)
 

Detailed Description

template<typename Encoding>
struct Transcoder< Encoding, Encoding >

Specialization of Transcoder with same source and target encoding.

Definition at line 691 of file encodings.h.

Member Function Documentation

template<typename Encoding >
template<typename InputStream , typename OutputStream >
static RAPIDJSON_FORCEINLINE bool Transcoder< Encoding, Encoding >::Transcode ( InputStream &  is,
OutputStream &  os 
)
inlinestatic

Definition at line 693 of file encodings.h.

693  {
694  os.Put(is.Take()); // Just copy one code unit. This semantic is different from primary template class.
695  return true;
696  }
template<typename Encoding >
template<typename InputStream , typename OutputStream >
static RAPIDJSON_FORCEINLINE bool Transcoder< Encoding, Encoding >::TranscodeUnsafe ( InputStream &  is,
OutputStream &  os 
)
inlinestatic

Definition at line 699 of file encodings.h.

699  {
700  PutUnsafe(os, is.Take()); // Just copy one code unit. This semantic is different from primary template class.
701  return true;
702  }
void PutUnsafe(Stream &stream, typename Stream::Ch c)
Write character to a stream, presuming buffer is reserved.
Definition: stream.h:91
template<typename Encoding >
template<typename InputStream , typename OutputStream >
static RAPIDJSON_FORCEINLINE bool Transcoder< Encoding, Encoding >::Validate ( InputStream &  is,
OutputStream &  os 
)
inlinestatic

Definition at line 705 of file encodings.h.

705  {
706  return Encoding::Validate(is, os); // source/target encoding are the same
707  }

The documentation for this struct was generated from the following file: