framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
framework
serializable
mutators
tuple_container.hpp
Go to the documentation of this file.
1
// Copyright (C) 2012 iwg molw5
2
// For conditions of distribution and use, see copyright notice in COPYING
3
13
#pragma once
14
15
#include <
framework/serializable/mutator_type.hpp
>
16
#include <
framework/serializable/base_types.hpp
>
17
18
namespace
framework
19
{
20
namespace
serializable
21
{
22
namespace
detail
23
{
24
template
<std::size_t Index,
typename
... Types>
25
struct
tuple_container_impl;
26
}
27
40
template
<
typename
Specification,
typename
Container>
41
struct
tuple_container
:
public
mutator_type
<Container>
42
{
43
};
44
55
template
<
56
typename
... Parameters,
57
typename
Container,
58
typename
Input,
59
typename
Output>
60
bool
read_dispatch
(
61
tuple_container
<
pack_container <Parameters...>
, Container>*,
62
Input& in, Output& out)
63
{
64
Container result;
65
if
(!
detail::tuple_container_impl <0, Parameters...>::read
(in, result))
66
return
false
;
67
68
out = std::move(result);
69
return
true
;
70
}
71
82
template
<
83
typename
... Parameters,
84
typename
Container,
85
typename
Input,
86
typename
Output>
87
bool
write_dispatch
(
88
tuple_container
<
pack_container <Parameters...>
, Container>*,
89
Input
const
& in, Output& out)
90
{
91
return
detail::tuple_container_impl <0, Parameters...>
::write
(in, out);
92
}
93
}
94
}
95
96
#include <framework/serializable/mutators/tuple_container.inl>
Generated on Wed Apr 10 2013 20:49:42 for framework by
1.8.3.1-20130402