adapt store/restore functions as well as size of, so that
for std::vector the size is stored if desired
This commit is contained in:
@@ -89,18 +89,34 @@ template <typename T> inline
|
||||
size_t size_of( const T& _v )
|
||||
{ return binary< T >::size_of(_v); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t size_of( const std::vector<T> & _v, bool _store_size = true)
|
||||
{ return binary< std::vector<T> >::size_of(_v, _store_size); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t size_of(void)
|
||||
{ return binary< T >::size_of(); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t size_of(bool _store_size)
|
||||
{ return binary< std::vector<T> >::size_of(_store_size); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t store( std::ostream& _os, const T& _v, bool _swap=false)
|
||||
{ return binary< T >::store( _os, _v, _swap ); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t store( std::ostream& _os, const std::vector<T>& _v, bool _swap=false, bool _store_size = true)
|
||||
{ return binary< std::vector<T> >::store( _os, _v, _swap, _store_size); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t restore( std::istream& _is, T& _v, bool _swap=false)
|
||||
{ return binary< T >::restore( _is, _v, _swap ); }
|
||||
|
||||
template <typename T> inline
|
||||
size_t restore( std::istream& _is, std::vector<T>& _v, bool _swap=false, bool _restore_size = true)
|
||||
{ return binary< std::vector<T> >::restore( _is, _v, _swap, _restore_size); }
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user