From: stephan b. <sg...@us...> - 2004-12-26 14:41:16
|
Update of /cvsroot/pclasses/pclasses2/src/s11n In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9210/src/s11n Modified Files: SIO.h Log Message: Added s11n_cast(). Index: SIO.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/s11n/SIO.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SIO.h 26 Dec 2004 09:44:27 -0000 1.4 +++ SIO.h 26 Dec 2004 14:41:07 -0000 1.5 @@ -221,6 +221,23 @@ */ std::string serializerClass(); + /** + Serializes fromobj and deserializes the data by passing + it to toobj. Returns false if either operation fails. + + SerializableT1 and SerializableT must of course be + Serializables for this to work. + + See ::P::s11n::s11n_cast() for full details, including + tips on how to use this to easily convert containers + to different types. + */ + template <typename SerializableT1, typename SerializableT2> + bool s11n_cast( const SerializableT1 & fromobj, SerializableT2 & toobj ) + { + return ::P::s11n::s11n_cast<S11nNode,SerializableT1,SerializableT2>( fromobj, toobj ); + } + } // namespace SIO } // namespace P |