proxygen
fizz::detail::Reader< U > Struct Template Reference

#include <Types-inl.h>

Public Member Functions

template<class T >
size_t read (typename std::enable_if< std::is_enum< T >::value &&std::is_same< U, T >::value, T >::type &out, folly::io::Cursor &cursor)
 
template<class T >
size_t read (typename std::enable_if< std::is_unsigned< T >::value &&std::is_same< U, T >::value, T >::type &out, folly::io::Cursor &cursor)
 

Detailed Description

template<class U>
struct fizz::detail::Reader< U >

Definition at line 234 of file Types-inl.h.

Member Function Documentation

template<class U >
template<class T >
size_t fizz::detail::Reader< U >::read ( typename std::enable_if< std::is_enum< T >::value &&std::is_same< U, T >::value, T >::type out,
folly::io::Cursor cursor 
)
inline

Definition at line 236 of file Types-inl.h.

References folly::io::detail::CursorBase< Derived, BufType >::readBE(), and type.

240  {
241  using UT = typename std::underlying_type<U>::type;
242  out = static_cast<U>(cursor.readBE<UT>());
243  return sizeof(U);
244  }
PskType type
template<class U >
template<class T >
size_t fizz::detail::Reader< U >::read ( typename std::enable_if< std::is_unsigned< T >::value &&std::is_same< U, T >::value, T >::type out,
folly::io::Cursor cursor 
)
inline

Definition at line 247 of file Types-inl.h.

References folly::io::detail::CursorBase< Derived, BufType >::readBE().

251  {
252  out = cursor.readBE<U>();
253  return sizeof(U);
254  }

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