Developer Documentation
Loading...
Searching...
No Matches
Serializers.hh
1#pragma once
2/*===========================================================================*\
3 * *
4 * OpenVolumeMesh *
5 * Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen *
6 * www.openvolumemesh.org *
7 * *
8 *---------------------------------------------------------------------------*
9 * This file is part of OpenVolumeMesh. *
10 * *
11 * OpenVolumeMesh is free software: you can redistribute it and/or modify *
12 * it under the terms of the GNU Lesser General Public License as *
13 * published by the Free Software Foundation, either version 3 of *
14 * the License, or (at your option) any later version with the *
15 * following exceptions: *
16 * *
17 * If other files instantiate templates or use macros *
18 * or inline functions from this file, or you compile this file and *
19 * link it with other files to produce an executable, this file does *
20 * not by itself cause the resulting executable to be covered by the *
21 * GNU Lesser General Public License. This exception does not however *
22 * invalidate any other reasons why the executable file might be *
23 * covered by the GNU Lesser General Public License. *
24 * *
25 * OpenVolumeMesh is distributed in the hope that it will be useful, *
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
28 * GNU Lesser General Public License for more details. *
29 * *
30 * You should have received a copy of the GNU LesserGeneral Public *
31 * License along with OpenVolumeMesh. If not, *
32 * see <http://www.gnu.org/licenses/>. *
33 * *
34\*===========================================================================*/
35
36
37#include <iostream>
38#include <map>
39#include <vector>
40
41#include <sstream>
42#include <string>
43
44#include <iterator>
45#include <OpenVolumeMesh/Config/Export.hh>
46
47namespace OpenVolumeMesh
48{
49
50template <typename ValueT>
51std::ostream& serialize(std::ostream& os, const ValueT& rhs);
52
53OVM_EXPORT
54std::ostream& serialize(std::ostream& os, const std::string& rhs);
55
56template <typename ValueT>
57std::istream& deserialize(std::istream& is, ValueT& rhs);
58
59OVM_EXPORT
60std::istream& deserialize(std::istream& is, std::string& rhs);
61
62template <typename KeyT, typename ValueT>
63std::ostream& operator<<(std::ostream& os, const std::map< KeyT, ValueT >& rhs);
64
65template <typename KeyT, typename ValueT>
66std::istream& operator>>(std::istream& is, std::map< KeyT, ValueT >& rhs);
67
68template <typename ValueT>
69std::ostream& operator<<(std::ostream& os, const std::vector< ValueT >& rhs);
70
71template <typename ValueT>
72std::istream& operator>>(std::istream& is, std::vector< ValueT >& rhs);
73
74OVM_EXPORT
75std::istream& operator>>(std::istream& is, std::vector< bool >& rhs);
76
77}
78
79#include <OpenVolumeMesh/FileManager/SerializersT_impl.hh>
std::istream & operator>>(std::istream &is, Matrix4x4T< Scalar > &m)
read the space-separated components of a vector from a stream *‍/