HP Integrity NonStop J-Series User Manual
Page 187

RWDEFINE_PERSISTABLE_TEMPLATE(YourClass) will expand to generate the source
code for the following global functions:
template<class T>
RWvostream& operator<<
(RWvostream& strm, const YourClass<T>& item)
template<class T>
RWvistream& operator>>
(RWvistream& strm, YourClass<T>& obj)
template<class T>
RWvistream& operator>>
(RWvistream& strm, YourClass<T>*& pObj)
template<class T>
RWFile& operator<<(RWFile& strm, const YourClass<T>& item)
template<class T>
RWFile& operator>>(RWFile& strm, YourClass<T>& obj)
template<class T>
RWFile& operator>>(RWFile& strm, YourClass<T>*& pObj)
For templatized classes with more than one and less than five template parameters, use
one of the following macros from rw/epersist.h:
// For YourClass<T1,T2>:
RWDEFINE_PERSISTABLE_TEMPLATE_2(YourClass)
// For YourClass<T1,T2,T3>:
RWDEFINE_PERSISTABLE_TEMPLATE_3(YourClass)
// For YourClass<T1,T2,T3,T4>:
RWDEFINE_PERSISTABLE_TEMPLATE_4(YourClass)
Remember, if your templatized class has any non-type template parameters, it cannot be
isomorphically persisted.
●
If you need to persist templatized classes with five or more template parameters, you can
write additional macros for RWDEFINE_PERSISTABLE_TEMPLATE_n. The macros are
found in the header file rw/epersist.h.
●
Check for Possible Problems
You've made the necessary data accessible, and declared and defined the global functions required for
isomorphic persistence. Before you go any further, you need to review your work for two possible
problems.