28#ifndef vtkMultiProcessSerialization_h
29#define vtkMultiProcessSerialization_h
39VTK_ABI_NAMESPACE_BEGIN
47template <
typename ElementType>
52 stream << static_cast<vtkTypeInt64>(set.size());
53 for (
const auto& elem : set)
63 for (vtkTypeInt64 cc = 0; cc < count; ++cc)
67 set.insert(std::move(elem));
72template <
typename ElementType, std::
size_t N>
77 for (
const auto& elem : array)
85 for (std::size_t cc = 0; cc < N; ++cc)
92template <
typename T1,
typename T2>
108template <
typename T1,
typename T2>
113 stream << static_cast<vtkTypeInt64>(map.size());
114 for (
const auto& pair : map)
124 for (vtkTypeInt64 cc = 0; cc < count; ++cc)
126 std::pair<T1, T2> pair;
128 map.insert(std::move(pair));
133template <
typename ElementType>
138 stream << static_cast<vtkTypeInt64>(vector.size());
139 for (
const auto& elem : vector)
149 for (vtkTypeInt64 cc = 0; cc < count; ++cc)
153 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)