-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiserializable.hpp
36 lines (30 loc) · 937 Bytes
/
iserializable.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/******************************************************************************
* GRIDGEN: Grid Generating Compiler
* By: Andy Stone (aistone@gmail.com)
* (C) Copyright 2011 Colorado State University
*****************************************************************************/
/** \addtogroup IO
* @{
*/
#ifndef ISERIALIZABLE_HPP_
#define ISERIALIZABLE_HPP_
#include <ostream>
/**
* Serializable objects are able to push or pull binary copies of themselves
* onto or from streams.
*/
class ISerializable {
public:
// =======================
// - [Input and Output] -
// =======================
/** @name Input and Output */
///@{
/** Output a binary copy of this object onto a stream. */
virtual void output(std::ostream &out) const = 0;
/** Input a binary copy of the object from a stream. */
virtual void input(std::istream &in) = 0;
///@}
};
#endif
/** @}*/