51 #ifndef OPENMESH_STORERESTORE_HH
52 #define OPENMESH_STORERESTORE_HH
58 #include <OpenMesh/Core/System/config.h>
59 #include <OpenMesh/Core/IO/SR_binary.hh>
60 #include <OpenMesh/Core/IO/SR_binary_spec.hh>
80 template <
typename T>
inline
84 template <
typename T>
inline
88 template <
typename T>
inline
92 template <
typename T>
inline
93 size_t size_of(
const std::vector<T> & _v,
bool _store_size =
true)
96 template <
typename T>
inline
100 template <
typename T>
inline
104 template <
typename T>
inline
105 size_t store( std::ostream& _os,
const T& _v,
bool _swap =
false)
108 template <
typename T>
inline
109 size_t store( std::ostream& _os,
const std::vector<T>& _v,
bool _swap=
false,
bool _store_size =
true)
112 template <
typename T>
inline
113 size_t restore( std::istream& _is, T& _v,
bool _swap =
false)
116 template <
typename T>
inline
117 size_t restore( std::istream& _is, std::vector<T>& _v,
bool _swap=
false,
bool _restore_size =
true)
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
size_t size_of(const T &_v)
Binary read a short from _is and perform byte swapping if _swap is true.
Definition: StoreRestore.hh:89
bool is_streamable(void)
Binary read a short from _is and perform byte swapping if _swap is true.
Definition: StoreRestore.hh:81
The struct defines how to store and restore the type T.
Definition: SR_binary.hh:102
static size_t restore(std::istream &, value_type &, bool=false, bool=true)
Restore a value of T and return the number of bytes read.
Definition: SR_binary.hh:126
static size_t store(std::ostream &, const value_type &, bool=false, bool=true)
Store a value of T and return the number of bytes written.
Definition: SR_binary.hh:118
static size_t size_of(void)
What's the size of T? If it depends on the actual value (e.g. for vectors) return UnknownSize.
Definition: SR_binary.hh:109