32 #ifndef __vtkVariantBoostSerialization_h
33 #define __vtkVariantBoostSerialization_h
35 #include "vtkSetGet.h"
42 #include <boost/archive/binary_oarchive.hpp>
44 #include <boost/serialization/base_object.hpp>
45 #include <boost/serialization/export.hpp>
46 #include <boost/serialization/extended_type_info_no_rtti.hpp>
47 #include <boost/serialization/split_free.hpp>
52 template<
typename Archiver>
54 const unsigned int vtkNotUsed(version))
56 ar & boost::serialization::base_object<vtkstd::string>(str);
63 template<
typename Archiver>
65 const unsigned int vtkNotUsed(version))
79 #define VTK_VARIANT_SAVE(Value,Type,Function) \
82 Type value = variant.Function(); \
100 #if defined(VTK_TYPE_USE___INT64)
104 #if defined(VTK_TYPE_USE_LONG_LONG)
110 cerr <<
"cannot serialize variant with type " << variant.
GetType()
113 #undef VTK_VARIANT_SAVE
116 template<
typename Archiver>
118 const unsigned int vtkNotUsed(version))
123 #define VTK_VARIANT_LOAD(Value,Type) \
128 variant = vtkVariant(value); \
146 #if defined(VTK_TYPE_USE___INT64)
150 #if defined(VTK_TYPE_USE_LONG_LONG)
155 cerr <<
"cannot deserialize variant with type " << Type <<
'\n';
158 #undef VTK_VARIANT_LOAD
167 template<typename Archiver>
169 const
unsigned int vtkNotUsed(version))
187 template<
typename Archiver>
189 const unsigned int vtkNotUsed(version))
Wrapper around vtkstd::string to keep symbols short.
#define VTK_VARIANT_SAVE(Value, Type, Function)
void load(Archiver &ar, vtkVariant &variant, const unsigned int vtkNotUsed(version))
void serialize(Archiver &ar, vtkStdString &str, const unsigned int vtkNotUsed(version))
An array holding vtkVariants.
vtkIdType GetNumberOfTuples()
#define VTK_UNSIGNED_SHORT
#define VTK_VARIANT_LOAD(Value, Type)
#define VTK_UNSIGNED___INT64
A atomic type representing the union of many types.
virtual void SetName(const char *)
void SetValue(vtkIdType id, vtkVariant value)
#define VTK_UNSIGNED_CHAR
void save(Archiver &ar, const vtkVariant &variant, const unsigned int vtkNotUsed(version))
virtual void SetNumberOfTuples(vtkIdType number)
#define VTK_UNSIGNED_LONG
vtkVariant & GetValue(vtkIdType id) const
unsigned int GetType() const
#define VTK_UNSIGNED_LONG_LONG