framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Constant Groups
alias.hpp File Reference

Serializable alias wrapper. More...

#include <framework/serializable/container_type.hpp>
#include <framework/serializable/containers/alias.inl>

Go to the source code of this file.

Classes

struct  framework::serializable::alias< Specification >
 Serializable alias wrapper. More...
 

Namespaces

 framework
 Framework namespace.
 
 framework::serializable
 Serializable namespace.
 

Constant Groups

 framework
 Framework namespace.
 
 framework::serializable
 Serializable namespace.
 

Detailed Description

Serializable alias wrapper.

Commonly used to forward processing to the default implementation:

template <typename Input, typename Output, typename... Specification>
bool read (Input& in, Output& out, Wrapper <Specification...>*)
{
// wrapper implementation
...
// forward to the default serializer
return read <alias <Specification>> (in, out);
}

May also be used to define partial class schematics. For example, the following Object definitions are equivalent:

using partial = alias <
value <NAME("Field 1"), int>,
value <NAME("Field 2"), float>;
class Object : public serializable <Object,
partial,
value <NAME("Field 3"), double>>
{
};
class Object : public serializable <Object,
value <NAME("Field 1"), int>,
value <NAME("Field 2"), float>
value <NAME("Field 3"), double>>
{
};