opm-simulators
SerializationPackers.hpp
1 /*
2  Copyright 2019 Equinor AS.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef SERIALIZATION_PACKERS_HPP
20 #define SERIALIZATION_PACKERS_HPP
21 
22 #include <opm/common/utility/MemPacker.hpp>
23 
24 #include <boost/date_time/gregorian/gregorian_types.hpp>
25 
26 // Additional packers for serializers using the mempacker.
27 
28 namespace Opm {
29 namespace Serialization {
30 namespace detail {
31 
32 template<>
33 struct Packing<false,boost::gregorian::date>
34 {
35  static std::size_t packSize(const boost::gregorian::date& data);
36 
37  static void pack(const boost::gregorian::date& data,
38  std::vector<char>& buffer, std::size_t& position);
39 
40  static void unpack(boost::gregorian::date& data,
41  const std::vector<char>& buffer, std::size_t& position);
42 };
43 
44 }
45 
46 } // end namespace Serialization
47 } // end namespace Opm
48 
49 #endif // SERIALIZATION_PACKERS_HPP
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45