40#ifndef vtkMultiProcessSerialization_h
41#define vtkMultiProcessSerialization_h
58template <
typename ElementType>
63 stream << static_cast<vtkTypeInt64>(set.size());
64 for (
const auto& elem : set)
74 for (vtkTypeInt64 cc = 0; cc < count; ++cc)
78 set.insert(std::move(elem));
83template <
typename ElementType, std::
size_t N>
88 for (
const auto& elem : array)
96 for (std::size_t cc = 0; cc < N; ++cc)
103template <
typename T1,
typename T2>
119template <
typename T1,
typename T2>
124 stream << static_cast<vtkTypeInt64>(map.size());
125 for (
const auto& pair : map)
135 for (vtkTypeInt64 cc = 0; cc < count; ++cc)
137 std::pair<T1, T2> pair;
139 map.insert(std::move(pair));
144template <
typename ElementType>
149 stream << static_cast<vtkTypeInt64>(
vector.size());
150 for (
const auto& elem :
vector)
160 for (vtkTypeInt64 cc = 0; cc < count; ++cc)
164 vector.push_back(std::move(elem));
stream used to pass data across processes using vtkMultiProcessController.
static void Save(vtkMultiProcessStream &stream, const std::array< ElementType, N > &array)
static void Load(vtkMultiProcessStream &stream, std::array< ElementType, N > &array)
static void Save(vtkMultiProcessStream &stream, const std::map< T1, T2 > &map)
static void Load(vtkMultiProcessStream &stream, std::map< T1, T2 > &map)
static void Save(vtkMultiProcessStream &stream, const std::pair< T1, T2 > &pair)
static void Load(vtkMultiProcessStream &stream, std::pair< T1, T2 > &pair)
static void Save(vtkMultiProcessStream &stream, const std::set< ElementType > &set)
static void Load(vtkMultiProcessStream &stream, std::set< ElementType > &set)
static void Save(vtkMultiProcessStream &stream, const std::vector< ElementType > &vector)
static void Load(vtkMultiProcessStream &stream, std::vector< ElementType > &vector)
static void Save(vtkMultiProcessStream &stream, const T &t)
static void Load(vtkMultiProcessStream &stream, T &t)
vtkMultiProcessStream & operator<<(vtkMultiProcessStream &stream, const T &value)
vtkMultiProcessStream & operator>>(vtkMultiProcessStream &stream, T &value)