TBTK
Need a break? Support the development by playing Polarity Puzzles
PseudoSerializable.h
Go to the documentation of this file.
1 /* Copyright 2019 Kristofer Björnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_PSEUDO_SERIALIZABLE
24 #define COM_DAFER45_TBTK_PSEUDO_SERIALIZABLE
25 
26 #include "TBTK/Serializable.h"
27 #include "TBTK/TBTKMacros.h"
28 
29 namespace TBTK{
30 
32 public:
34  std::string serialize(Serializable::Mode mode);
35 };
36 
38  TBTKExit(
39  "PseudoSerializable::serialize()",
40  "A class inheriting from PseudoSerializable does not implement"
41  << "the function serialize().",
42  "Make sure all classes inheriting from PseudoSerializable"
43  << " implements a function with the signature 'std::string"
44  << " serializable(Serializable::Mode mode)'. If you do not"
45  << " inherit from PseudoSerializable, or all such classes"
46  << " indeed do implement the given function, this may be an"
47  << " error in TBTK. If you susceptct the later is the case,"
48  << " contact the developer."
49  );
50 }
51 
52 }; //End namespace TBTK
53 
54 #endif
TBTK::PseudoSerializable::serialize
std::string serialize(Serializable::Mode mode)
Definition: PseudoSerializable.h:37
Serializable.h
Abstract base class for serializable objects.
TBTKMacros.h
Precompiler macros.
TBTK::Serializable::Mode
Mode
Definition: Serializable.h:47
TBTK::PseudoSerializable
Definition: PseudoSerializable.h:31