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

Type definitions for xdrc compiler output. More...

#include <array>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <memory>
#include <stdexcept>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <limits>
#include <xdrpp/endian.h>
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xdr::xdr_runtime_error
 Generic class of XDR unmarshaling errors. More...
 
struct  xdr::xdr_overflow
 Attempt to exceed the bounds of a variable-length array or string. More...
 
struct  xdr::xdr_bad_message_size
 Message not multiple of 4 bytes, or cannot fully be parsed. More...
 
struct  xdr::xdr_bad_discriminant
 Attempt to set invalid value for a union discriminant. More...
 
struct  xdr::xdr_should_be_zero
 Padding bytes that should have contained zero don't. More...
 
struct  xdr::xdr_invariant_failed
 Exception for use by xdr::xdr_validate. More...
 
struct  xdr::xdr_wrong_union
 Attempt to access wrong field of a union. More...
 
struct  xdr::archive_adapter< Archive >
 This is used to apply an archive to a field. More...
 
struct  xdr::xdr_traits< T >
 Metadata for all marshalable XDR types. More...
 
struct  xdr::xdr_traits_base
 Default xdr_traits values for actual XDR types, used as a supertype for most xdr::xdr_traits specializations. More...
 
struct  xdr::xdr_integral_base< T, U >
 Default traits for use as supertype of specializations of xdr_traits for integral types. More...
 
struct  xdr::xdr_traits< std::int32_t >
 
struct  xdr::xdr_traits< std::uint32_t >
 
struct  xdr::xdr_traits< std::int64_t >
 
struct  xdr::xdr_traits< std::uint64_t >
 
struct  xdr::xdr_fp_base< T, U >
 Default traits for use as supertype of specializations of xdr_traits for floating-point types. More...
 
struct  xdr::xdr_traits< float >
 
struct  xdr::xdr_traits< double >
 
struct  xdr::xdr_traits< bool >
 
struct  xdr::xarray< T, N >
 XDR arrays are implemented using std::array as a supertype. More...
 
struct  xdr::xdr_traits< xarray< T, N > >
 
struct  xdr::opaque_array< N >
 XDR opaque is represented as std::uint8_t;. More...
 
struct  xdr::xdr_traits< opaque_array< N > >
 
struct  xdr::xvector< T, N >
 A vector with a maximum size (returned by xvector::max_size()). More...
 
struct  xdr::xdr_traits< xvector< T, N > >
 
struct  xdr::xdr_traits< xvector< std::uint8_t, N > >
 
struct  xdr::xstring< N >
 A string with a maximum length (returned by xstring::max_size()). More...
 
struct  xdr::xdr_traits< xstring< N > >
 
struct  xdr::pointer< T >
 Optional data (represented with pointer notation in XDR source). More...
 
struct  xdr::xdr_traits< pointer< T > >
 
struct  xdr::field_ptr< T, F, Ptr >
 Type-level representation of a pointer-to-member value. More...
 
struct  xdr::xdr_struct_base< Fields >
 
struct  xdr::xdr_struct_base<>
 Supertype to construct XDR traits of structure objects, used in output of the xdrc compiler. More...
 
struct  xdr::xdr_struct_base< FP, Rest... >
 
struct  xdr::indices< N >
 Placeholder type used to contain a parameter pack of tuple indices, so as to unpack a tuple in function call arguments. More...
 
struct  xdr::xdr_traits< std::tuple< T... > >
 
struct  xdr::field_constructor_t
 
struct  xdr::field_destructor_t
 
struct  xdr::field_assigner_t
 
struct  xdr::field_archiver_t
 
struct  xdr::field_size_t
 

Namespaces

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

Macros

#define ASSIGN_LIKE(method)
 

Typedefs

template<uint32_t N = XDR_MAX_LEN>
using xdr::opaque_vec = xvector< std::uint8_t, N >
 Variable-length opaque data is just a vector of std::uint8_t.
 
template<typename T >
using xdr::all_indices_of = typename detail::all_indices< std::tuple_size< typename std::remove_reference< T >::type >::value >
 A type representing all the indices of a particuar tuple.
 
using xdr::xdr_void = std::tuple<>
 Placehoder type representing void values marshaled as 0 bytes.
 

Functions

uint32_t xdr::size32 (std::size_t s)
 
template<typename T >
void xdr::validate (const T &t)
 If this function template is specialized, it provides a means of placing extra restrictions on XDR data structures (beyond those of the XDR specification). More...
 
template<typename Archive , typename T >
void xdr::archive (Archive &ar, T &&t, const char *name=nullptr)
 By default, this function simply applies ar (which must be a function object) to t. More...
 
template<typename T >
std::size_t xdr::xdr_size (const T &t)
 Return the marshaled size of an XDR data type.
 
template<typename To , typename From >
To xdr::xdr_reinterpret (From f)
 A reinterpret-cast like function that works between types such as floating-point and integers of the same size. More...
 
template<typename T >
std::enable_if< xdr_traits< T >::is_struct &&xdr_traits< T >::xdr_defined, bool >::type xdr::operator== (const T &a, const T &b)
 Equality for XDR structures. More...
 
template<typename T >
std::enable_if< xdr_traits< T >::is_struct &&xdr_traits< T >::xdr_defined, bool >::type xdr::operator!= (const T &a, const T &b)
 
template<typename T >
std::enable_if< xdr_traits< T >::is_struct &&xdr_traits< T >::xdr_defined, bool >::type xdr::operator< (const T &a, const T &b)
 Ordering of XDR structures. See note at xdr::operator==.
 
template<typename T >
std::enable_if< xdr_traits< T >::is_struct &&xdr_traits< T >::xdr_defined, bool >::type xdr::operator> (const T &a, const T &b)
 
template<typename T >
std::enable_if< xdr_traits< T >::is_struct &&xdr_traits< T >::xdr_defined, bool >::type xdr::operator<= (const T &a, const T &b)
 
template<typename T >
std::enable_if< xdr_traits< T >::is_struct &&xdr_traits< T >::xdr_defined, bool >::type xdr::operator>= (const T &a, const T &b)
 
template<typename T >
std::enable_if< xdr_traits< T >::is_union, bool >::type xdr::operator== (const T &a, const T &b)
 Equality of XDR unions. More...
 
template<typename T >
std::enable_if< xdr_traits< T >::is_union, bool >::type xdr::operator< (const T &a, const T &b)
 Ordering of XDR unions. See note at xdr::operator==.
 

Variables

Constexpr const field_constructor_t xdr::field_constructor {}
 Passed to the auto-generated _xdr_with_mem_ptr static method to construct the active union field (or at least the union field corresponding to the second argument to _xdr_with_mem_ptr, which should be the active union field). More...
 
Constexpr const field_destructor_t xdr::field_destructor {}
 Passed to _xdr_with_mem_ptr to destroy the active union field.
 
Constexpr const field_assigner_t xdr::field_assigner {}
 Passed to _xdr_with_mem_ptr to assign to the active union field.
 
Constexpr const field_archiver_t xdr::field_archiver {}
 Passed to _xdr_with_mem_ptr to archive the active union field.
 
Constexpr const field_size_t xdr::field_size {}
 Passed to _xdr_with_mem_ptr to compute the size of the active union field. More...
 

Detailed Description

Type definitions for xdrc compiler output.

Definition in file types.h.