|
|
|
@ -160,6 +160,7 @@ enum
@@ -160,6 +160,7 @@ enum
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#define READWRITE(obj) (::SerReadWrite(s, (obj), nType, nVersion, ser_action)) |
|
|
|
|
#define READWRITEMANY(...) (::SerReadWriteMany(s, nType, nVersion, ser_action, __VA_ARGS__)) |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implement three methods for serializable objects. These are actually wrappers over |
|
|
|
@ -960,4 +961,52 @@ public:
@@ -960,4 +961,52 @@ public:
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template<typename Stream> |
|
|
|
|
void SerializeMany(Stream& s, int nType, int nVersion) |
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream, typename Arg> |
|
|
|
|
void SerializeMany(Stream& s, int nType, int nVersion, Arg&& arg) |
|
|
|
|
{ |
|
|
|
|
::Serialize(s, std::forward<Arg>(arg), nType, nVersion); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream, typename Arg, typename... Args> |
|
|
|
|
void SerializeMany(Stream& s, int nType, int nVersion, Arg&& arg, Args&&... args) |
|
|
|
|
{ |
|
|
|
|
::Serialize(s, std::forward<Arg>(arg), nType, nVersion); |
|
|
|
|
::SerializeMany(s, nType, nVersion, std::forward<Args>(args)...); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream> |
|
|
|
|
inline void UnserializeMany(Stream& s, int nType, int nVersion) |
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream, typename Arg> |
|
|
|
|
inline void UnserializeMany(Stream& s, int nType, int nVersion, Arg& arg) |
|
|
|
|
{ |
|
|
|
|
::Unserialize(s, arg, nType, nVersion); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream, typename Arg, typename... Args> |
|
|
|
|
inline void UnserializeMany(Stream& s, int nType, int nVersion, Arg& arg, Args&... args) |
|
|
|
|
{ |
|
|
|
|
::Unserialize(s, arg, nType, nVersion); |
|
|
|
|
::UnserializeMany(s, nType, nVersion, args...); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream, typename... Args> |
|
|
|
|
inline void SerReadWriteMany(Stream& s, int nType, int nVersion, CSerActionSerialize ser_action, Args&&... args) |
|
|
|
|
{ |
|
|
|
|
::SerializeMany(s, nType, nVersion, std::forward<Args>(args)...); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename Stream, typename... Args> |
|
|
|
|
inline void SerReadWriteMany(Stream& s, int nType, int nVersion, CSerActionUnserialize ser_action, Args&... args) |
|
|
|
|
{ |
|
|
|
|
::UnserializeMany(s, nType, nVersion, args...); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif // BITCOIN_SERIALIZE_H
|
|
|
|
|