17#ifndef vtkVariantBoostSerialization_h 
   18#define vtkVariantBoostSerialization_h 
   27#include <boost/archive/binary_oarchive.hpp> 
   29#include <boost/serialization/base_object.hpp> 
   30#include <boost/serialization/export.hpp> 
   31#include <boost/serialization/extended_type_info_no_rtti.hpp> 
   32#include <boost/serialization/split_free.hpp> 
   37template <
typename Archiver>
 
   40  ar& boost::serialization::base_object<std::string>(str);
 
   45template <
typename Archiver>
 
   46void save(Archiver& ar, 
const std::string& str, 
const unsigned int vtkNotUsed(version))
 
   51template <
typename Archiver>
 
   52void load(Archiver& ar, std::string& str, 
const unsigned int vtkNotUsed(version))
 
   63template <
typename Archiver>
 
   64void save(Archiver& ar, 
const vtkVariant& variant, 
const unsigned int vtkNotUsed(version))
 
   78#define VTK_VARIANT_SAVE(Value, Type, Function)                                                    \ 
   81    Type value = variant.Function();                                                               \ 
  102      cerr << 
"cannot serialize variant with type " << variant.
GetType() << 
'\n';
 
  104#undef VTK_VARIANT_SAVE 
  107template <
typename Archiver>
 
  108void load(Archiver& ar, 
vtkVariant& variant, 
const unsigned int vtkNotUsed(version))
 
  113#define VTK_VARIANT_LOAD(Value, Type)                                                              \ 
  118    variant = vtkVariant(value);                                                                   \ 
  141      cerr << 
"cannot deserialize variant with type " << 
static_cast<unsigned int>(Type) << 
'\n';
 
  144#undef VTK_VARIANT_LOAD 
  153template <
typename Archiver>
 
  160  if (array.
GetName() != 
nullptr)
 
  173template <
typename Archiver>
 
virtual char * GetName()
Set/get array's name.
 
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
 
virtual void SetName(const char *)
Set/get array's name.
 
Wrapper around std::string to keep symbols short.
 
An array holding vtkVariants.
 
void SetNumberOfTuples(vtkIdType number) override
Set the number of tuples (a component group) in the array.
 
vtkVariant & GetValue(vtkIdType id) const
Get the data at a particular index.
 
void SetValue(vtkIdType id, vtkVariant value)
Set the data at a particular index.
 
A type representing the union of many types.
 
unsigned int GetType() const
Get the type of the variant.
 
bool IsValid() const
Get whether the variant value is valid.
 
#define VTK_UNSIGNED_CHAR
 
#define VTK_UNSIGNED_SHORT
 
#define VTK_UNSIGNED_LONG
 
#define VTK_UNSIGNED_LONG_LONG
 
#define VTK_VARIANT_SAVE(Value, Type, Function)
 
void serialize(Archiver &ar, vtkStdString &str, const unsigned int vtkNotUsed(version))
 
#define VTK_VARIANT_LOAD(Value, Type)
 
void load(Archiver &ar, std::string &str, const unsigned int vtkNotUsed(version))
 
void save(Archiver &ar, const std::string &str, const unsigned int vtkNotUsed(version))