ISerializable.h
Go to the documentation of this file.
1 #ifndef iser_ISerializable_included
2 #define iser_ISerializable_included
3 
4 
5 // ACF includes
6 #include <istd/IChangeable.h>
7 #include <iser/IVersionInfo.h>
8 
9 
10 namespace iser
11 {
12 
13 
14 class IArchive;
15 
16 
23 class ISerializable: virtual public istd::IChangeable
24 {
25 public:
31  virtual bool Serialize(IArchive& archive) = 0;
36  virtual quint32 GetMinimalVersion(int versionId) const;
37 };
38 
39 
40 // inline methods
41 
42 inline quint32 ISerializable::GetMinimalVersion(int /*versionId*/) const
43 {
44  return 0;
45 }
46 
47 
48 } // namespace iser
49 
50 
51 #endif // !iser_ISerializable_included
52 
53 
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
virtual bool Serialize(IArchive &archive)=0
Load or store state of this object as a archive stream.
Represent input/output persistence archive.
Definition: IArchive.h:30
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual quint32 GetMinimalVersion(int versionId) const
Get minimal needed version to correct storing of this data.
Definition: ISerializable.h:42

© 2007-2017 Witold Gantzke and Kirill Lepskiy