CppWAMP
C++11 client library for the WAMP protocol
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
codec.hpp File Reference

Contains essential definitions for wamp::Variant codecs. More...

#include <istream>
#include <ostream>
#include "api.hpp"
#include "config.hpp"
#include "messagebuffer.hpp"
#include "traits.hpp"
#include "variant.hpp"

Go to the source code of this file.

Classes

struct  wamp::KnownCodecIds
 IDs used by rawsocket transports to negotiate the serializer. More...
 
struct  wamp::ByteContainerOutputCategory
 Output category for containers of bytes which provide push_back and insert member functions. More...
 
struct  wamp::StreamOutputCategory
 Output category for output streams of bytes. More...
 
struct  wamp::UnknownOutputCategory
 Type used to indicate output category detection failed. More...
 
struct  wamp::OutputCategory< O, Enabled >
 Traits class that determines the category type that best matches the given output type. More...
 
struct  wamp::ByteArrayInputCategory
 Input category for contiguous byte arrays which provide data and size member functions. More...
 
struct  wamp::StreamInputCategory
 Input category for input streams of bytes. More...
 
struct  wamp::UnknownInputCategory
 Type used to indicate input category detection failed. More...
 
struct  wamp::InputCategory< I, Enabled >
 Traits class that determines the category type that best matches the given input type. More...
 

Namespaces

 wamp
 

Typedefs

template<typename O >
using wamp::OutputCategoryTypeOf = typename OutputCategory< ValueTypeOf< O > >::type
 Yields the category type that best matches the given output type.
 
template<typename F , typename O , typename C = OutputCategoryTypeOf<O>>
using wamp::Encoder = typename F::template Encoder< ValueTypeOf< O >, C >
 Yields the encoder type needed to encode a Variant to the given output type and output category. More...
 
template<typename I >
using wamp::InputCategoryTypeOf = typename InputCategory< ValueTypeOf< I > >::type
 Yields the category type that best matches the given input type.
 
template<typename F , typename I , typename C = InputCategoryTypeOf<I>>
using wamp::Decoder = typename F::template Decoder< ValueTypeOf< I >, C >
 Yields the decoder type needed to decode a Variant from the given input type and input category. More...
 

Functions

template<typename TFormat , typename TOutput >
void wamp::encode (const Variant &variant, TOutput &&output)
 Encodes the given variant to the given byte container or stream. More...
 
template<typename TFormat , typename TInput >
std::error_code wamp::decode (TInput &&input, Variant &variant)
 Decodes from the given byte sequence or stream to the given variant. More...
 

Detailed Description

Contains essential definitions for wamp::Variant codecs.


Class Documentation

◆ wamp::ByteContainerOutputCategory

struct wamp::ByteContainerOutputCategory

Output category for containers of bytes which provide push_back and insert member functions.

◆ wamp::StreamOutputCategory

struct wamp::StreamOutputCategory

Output category for output streams of bytes.

◆ wamp::UnknownOutputCategory

struct wamp::UnknownOutputCategory

Type used to indicate output category detection failed.

◆ wamp::OutputCategory

struct wamp::OutputCategory

template<typename O, typename Enabled = void>
struct wamp::OutputCategory< O, Enabled >

Traits class that determines the category type that best matches the given output type.

◆ wamp::ByteArrayInputCategory

struct wamp::ByteArrayInputCategory

Input category for contiguous byte arrays which provide data and size member functions.

◆ wamp::StreamInputCategory

struct wamp::StreamInputCategory

Input category for input streams of bytes.

◆ wamp::UnknownInputCategory

struct wamp::UnknownInputCategory

Type used to indicate input category detection failed.

◆ wamp::InputCategory

struct wamp::InputCategory

template<typename I, typename Enabled = void>
struct wamp::InputCategory< I, Enabled >

Traits class that determines the category type that best matches the given input type.