ThunderEgg  1.0.0
Serializable.h
Go to the documentation of this file.
1 /***************************************************************************
2  * ThunderEgg, a library for solvers on adaptively refined block-structured
3  * Cartesian grids.
4  *
5  * Copyright (c) 2018-2021 Scott Aiton
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19  ***************************************************************************/
20 
21 #ifndef SERIALIZABLE_H
22 #define SERIALIZABLE_H
23 
29 #include <memory>
30 namespace ThunderEgg {
35 {
36 public:
40  virtual ~Serializable() = default;
47  virtual int serialize(char* buffer) const = 0;
54  virtual int deserialize(char* buffer) = 0;
55 };
56 } // namespace ThunderEgg
57 #endif
ThunderEgg::Serializable::serialize
virtual int serialize(char *buffer) const =0
Serialize object into buffer.
ThunderEgg::Serializable
Interface for serializing objects.
Definition: Serializable.h:34
ThunderEgg::Serializable::~Serializable
virtual ~Serializable()=default
Destroy the Serializable object.
ThunderEgg
The ThunderEgg namespace.
Definition: BiLinearGhostFiller.h:31
ThunderEgg::Serializable::deserialize
virtual int deserialize(char *buffer)=0
Deserialize an object.