|
| template<> |
| void | Read< InterfaceInfo > (IPMStream *stream, InterfaceInfo &entry) |
| |
| template<> |
| void | Write< InterfaceInfo > (IPMStream *stream, const InterfaceInfo &entry) |
| |
| template<typename T > |
| void | Read (IPMStream *stream, T &t) |
| |
| template<typename T > |
| void | Write (IPMStream *stream, const T &t) |
| |
| template<> |
| void | Read< uint8 > (IPMStream *stream, uint8 &n) |
| |
| template<> |
| void | Write< uint8 > (IPMStream *stream, const uint8 &n) |
| |
| template<> |
| void | Read< uint16 > (IPMStream *stream, uint16 &n) |
| |
| template<> |
| void | Write< uint16 > (IPMStream *stream, const uint16 &n) |
| |
| template<> |
| void | Read< uint32 > (IPMStream *stream, uint32 &n) |
| |
| template<> |
| void | Write< uint32 > (IPMStream *stream, const uint32 &n) |
| |
| template<> |
| void | Read< uint64 > (IPMStream *stream, uint64 &i) |
| |
| template<> |
| void | Write< uint64 > (IPMStream *stream, const uint64 &i) |
| |
| template<> |
| void | Read< int16 > (IPMStream *stream, int16 &i) |
| |
| template<> |
| void | Write< int16 > (IPMStream *stream, const int16 &i) |
| |
| template<> |
| void | Read< int32 > (IPMStream *stream, int32 &i) |
| |
| template<> |
| void | Write< int32 > (IPMStream *stream, const int32 &i) |
| |
| template<> |
| void | Read< int64 > (IPMStream *stream, int64 &i) |
| |
| template<> |
| void | Write< int64 > (IPMStream *stream, const int64 &i) |
| |
| template<> |
| void | Read< PMReal > (IPMStream *stream, PMReal &n) |
| |
| template<> |
| void | Write< PMReal > (IPMStream *stream, const PMReal &n) |
| |
| template<> |
| void | Read< PMPoint > (IPMStream *stream, PMPoint &n) |
| |
| template<> |
| void | Write< PMPoint > (IPMStream *stream, const PMPoint &n) |
| |
| template<> |
| void | Read (IPMStream *stream, PMRect &n) |
| |
| template<> |
| void | Write (IPMStream *stream, const PMRect &n) |
| |
| template<> |
| void | Read< UTF32TextChar > (IPMStream *stream, UTF32TextChar &u) |
| |
| template<> |
| void | Write< UTF32TextChar > (IPMStream *stream, const UTF32TextChar &u) |
| |
| template<> |
| void | Read (IPMStream *stream, std::string &str) |
| |
| template<> |
| void | Write (IPMStream *stream, const std::string &str) |
| |
Read/Write template specializations for base types. These functions follow the recipe for implementing serialization utilities for non-parameterized types as outlined in IPMStream.h.
Users of these functions need not concern themselves with these implementation specifics. They can simply make calls such as Persist::Read (stream, myUint8) or Persist::Write (stream, myInt32).
Note: We do not provide the same for base types that are platform-dependent, such as bool, wchar_t, size_t.
Serializer template specializations for K2 types. These structs follow the recipe for implementing serialization utilities for parameterized types as outlined in IPMStream.h.
Users of these utilities need not concern themselves with these implementation specifics. They can simply make calls such as Persist::Read (stream, myK2Pair) or Persist::Write (stream, myK2Vector).
Serializer and Read/Write template specializations for STL types. These structs and functions follow the recipes for implementing serialization utilities for parameterized and non-parameterized types respectively as outlined in IPMStream.h.
Users of these utilities need not concern themselves with these implementation specifics. They can simply make calls such as Persist::Read (stream, mySTLPair) or Persist::Write (stream, mySTLString).
template<typename T >
| void Persist::Read | ( | IPMStream * | stream, | | | T & | t | | ) | | |
| inline |
A template function for reading a generic type.
- Parameters
| stream | IN The stream to read from. |
| t | OUT The object to read into. |
Usage is straightforward; for example Persist::Read(stream, myInt32). The following implementation specifics can be ignored unless you have a type that you want to provide serialization utilities for.
The default implementation of this method calls ReadWrite on the object to be read into.
If you need to override this behavior for a non-parameterized type such as int32, you should provide a template specialization with the appropriate implementation. See Read<int32> in PersistBaseTypes.h for an example. DO NOT PROVIDE A NON-TEMPLATE OVERLOAD FOR THIS METHOD.
If you need to override this behavior for a parameterized type such as std::pair, you would instead need to provide a template specialization for Serializer as mentioned above.
template<typename T >
| void Persist::Write | ( | IPMStream * | stream, | | | const T & | t | | ) | | |
| inline |
A template function for writing a generic type.
- Parameters
| stream | IN The stream to write to. |
| t | IN The object to write. |
Usage is straightforward; for example Persist::Write(stream, myInt32). The following implementation specifics can be ignored unless you have a type that you want to provide serialization utilities for.
The default implementation of this method calls ReadWrite on the object to be written.
If you need to override this behavior for a non-parameterized type such as int32, you should provide a template specialization with the appropriate implementation. See Write<int32> in PersistBaseTypes.h for an example. DO NOT PROVIDE A NON-TEMPLATE OVERLOAD FOR THIS METHOD.
If you need to override this behavior for a parameterized type such as std::pair, you would instead need to provide a template specialization for Serializer as mentioned above.