#ifndef ANDROID_PDX_RPC_SERIALIZATION_H_ #define ANDROID_PDX_RPC_SERIALIZATION_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "array_wrapper.h" #include "default_initialization_allocator.h" #include "encoding.h" #include "pointer_wrapper.h" #include "string_wrapper.h" #include "variant.h" namespace android { namespace pdx { namespace rpc { // Automatic serialization/deserialization library based on MessagePack // (http://msgpack.org). This library provides top level Serialize() and // Deserialize() functions to encode/decode a variety of data types. // // The following data types are supported: // * Standard signed integer types: int8_t, int16_t, int32_t, and int64_t. // * Regular signed integer types equivalent to the standard types: // signed char, short, int, long, and long long. // * Standard unsigned integer types: uint8_t, uint16_t, uint32_t, and // uint64_t. // * Regular unsigned integer types equivalent to the standard types: // unsigned char, unsigned short, unsigned int, unsigned long, // and unsigned long long. // * char without signed/unsigned qualifiers. // * bool. // * std::vector with value type of any supported type, including nesting. // * std::string. // * std::tuple with elements of any supported type, including nesting. // * std::pair with elements of any supported type, including nesting. // * std::map with keys and values of any supported type, including nesting. // * std::unordered_map with keys and values of any supported type, including // nesting. // * std::array with values of any supported type, including nesting. // * ArrayWrapper of any supported basic type. // * BufferWrapper of any POD type. // * StringWrapper of any supported char type. // * User types with correctly defined SerializableMembers member type. // // Planned support for: // * std::basic_string with all supported char types. // Counting template for managing template recursion. template struct Index {}; // Forward declaration of traits type to access types with a SerializedMembers // member type. template class SerializableTraits; template struct SerializableMembersType; // Utility to deduce the template type from a derived type. template