xdrpp
RFC4506 XDR compiler and message library
Classes | Namespaces | Typedefs | Functions
marshal.h File Reference

Support for marshaling XDR types in the format specified by RFC4506. More...

#include <cstring>
#include <xdrpp/endian.h>
#include <xdrpp/message.h>
#include <xdrpp/types.h>
#include <iostream>
Include dependency graph for marshal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xdr::marshal_base
 Common utility types and functions for all the marshaling classes. More...
 
struct  xdr::marshal_base::u64conv
 
struct  xdr::marshal_noswap
 Numeric marshaling mixin that does not byteswap any numeric values (which will produce RFC4506 output on a big-endian machine). More...
 
struct  xdr::marshal_swap
 Numeric marshaling mixin that byteswaps all numeric values (thus producing RFC4506 output on a little-endian machine). More...
 
struct  xdr::xdr_generic_put< Base >
 Archive type for marshaling to a buffer. More...
 
struct  xdr::xdr_generic_get< Base >
 Archive type for unmarshaling from a buffer. More...
 

Namespaces

 xdr
 Most of the xdrpp library is encapsulated in the xdr namespace.
 

Typedefs

using xdr::xdr_put = xdr_generic_put< marshal_swap >
 Archive for marshaling in RFC4506 big-endian order.
 
using xdr::xdr_get = xdr_generic_get< marshal_swap >
 Archive for unmarshaling in RFC4506 big-endian order.
 

Functions

std::size_t xdr::xdr_argpack_size ()
 
template<typename T , typename... Args>
std::size_t xdr::xdr_argpack_size (const T &t, const Args &...a)
 Returns the sum of bytes required to marshal all of the argument values. More...
 
template<typename Archive >
void xdr::xdr_argpack_archive (Archive &)
 
template<typename Archive , typename T , typename... Args>
void xdr::xdr_argpack_archive (Archive &ar, T &&t, Args &&...args)
 Applies an archive to each argument.
 
template<typename... Args>
msg_ptr xdr::xdr_to_msg (const Args &...args)
 Marshal one or a series of XDR types into a newly allocated buffer referenced xdr::msg_ptr. More...
 
template<typename... Args>
opaque_vec xdr::xdr_to_opaque (const Args &...args)
 Marshal one or a series of XDR types into a newly allocated opaque structure for embedding in other XDR types. More...
 
template<typename... Args>
void xdr::xdr_from_msg (const msg_ptr &m, Args &...args)
 This does the reverse of xdr::xdr_to_msg, unmarshalling one or more types from a message. More...
 
template<typename Bytes , typename... Args>
auto xdr::xdr_from_opaque (const Bytes &m, Args &...args) -> decltype(detail::bytes_to_void(m.data()))
 The reverse of xdr::xdr_to_opaque. More...
 

Detailed Description

Support for marshaling XDR types in the format specified by RFC4506.

Definition in file marshal.h.