Go to the documentation of this file.
32 #ifndef vtkVariantBoostSerialization_h
33 #define vtkVariantBoostSerialization_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>
56 ar & boost::serialization::base_object<std::string>(str);
63 template<
typename Archiver>
71 template<
typename Archiver>
87 template<
typename Archiver>
103 #define VTK_VARIANT_SAVE(Value,Type,Function) \
106 Type value = variant.Function(); \
125 #if defined(VTK_TYPE_USE___INT64)
129 #if defined(VTK_TYPE_USE_LONG_LONG)
135 cerr <<
"cannot serialize variant with type " << variant.
GetType()
138 #undef VTK_VARIANT_SAVE
141 template<
typename Archiver>
148 #define VTK_VARIANT_LOAD(Value,Type) \
153 variant = vtkVariant(value); \
172 #if defined(VTK_TYPE_USE___INT64)
176 #if defined(VTK_TYPE_USE_LONG_LONG)
181 cerr <<
"cannot deserialize variant with type " <<
static_cast<unsigned int>(Type) <<
'\n';
184 #undef VTK_VARIANT_LOAD
193 template<
typename Archiver>
213 template<
typename Archiver>
#define VTK_UNSIGNED_LONG_LONG
#define VTK_VARIANT_LOAD(Value, Type)
vtkVariant & GetValue(vtkIdType id) const
#define VTK_UNICODE_STRING
#define VTK_UNSIGNED_SHORT
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
void serialize(Archiver &ar, vtkStdString &str, const unsigned int vtkNotUsed(version))
unsigned int GetType() const
#define VTK_UNSIGNED___INT64
#define VTK_VARIANT_SAVE(Value, Type, Function)
An array holding vtkVariants.
static vtkUnicodeString from_utf8(const char *)
vtkIdType GetNumberOfTuples()
void load(Archiver &ar, vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
GLuint const GLchar * name
GLsizei const GLfloat * value
void SetValue(vtkIdType id, vtkVariant value)
String class that stores Unicode text.
virtual void SetNumberOfTuples(vtkIdType number)
const char * utf8_str() const
A atomic type representing the union of many types.
#define VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_LONG
Wrapper around std::string to keep symbols short.
GLsizei const GLchar ** string
virtual void SetName(const char *)