LLVM  6.0.0svn
llvm::orc::rpc::SerializationTraits< ChannelT, WireType, ConcreteType, typename > Class Template Reference

The SerializationTraits<ChannelT, T> class describes how to serialize and deserialize an instance of type T to/from an abstract channel of type ChannelT. More...

#include "llvm/ExecutionEngine/Orc/RPCSerialization.h"

Detailed Description

template<typename ChannelT, typename WireType, typename ConcreteType = WireType, typename = void>
class llvm::orc::rpc::SerializationTraits< ChannelT, WireType, ConcreteType, typename >

The SerializationTraits<ChannelT, T> class describes how to serialize and deserialize an instance of type T to/from an abstract channel of type ChannelT.

It also provides a representation of the type's name via the getName method.

Specializations of this class should provide the following functions:

static const char* getName();
static Error serialize(ChannelT&, const T&);
static Error deserialize(ChannelT&, T&);

The third argument of SerializationTraits is intended to support SFINAE. E.g.:

class MyVirtualChannel { ... };
template <DerivedChannelT>
class SerializationTraits<DerivedChannelT, bool,
typename std::enable_if<
std::is_base_of<VirtChannel, DerivedChannel>::value
>::type> {
public:
static const char* getName() { ... };
}

Definition at line 243 of file RPCSerialization.h.


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