//****************************************************************************** // RCF - Remote Call Framework // Copyright (c) 2005 - 2007. All rights reserved. // Consult your license for conditions of use. // Developed by Jarl Lindrud. // Contact: jlindrud@hotmail.com . //****************************************************************************** #ifndef INCLUDE_SF_SERIALIZESTL_HPP #define INCLUDE_SF_SERIALIZESTL_HPP #include namespace SF { class PushBackSemantics { public: template void operator()(Container &container, const Value &value) { container.push_back(value); } }; class InsertSemantics { public: template void operator()(Container &container, const Value &value) { container.insert(value); } }; template void serializeStlContainer(Archive &ar, StlContainer &t, const unsigned int) { typedef typename StlContainer::iterator Iterator; typedef typename StlContainer::value_type Value; if (ar.isRead()) { t.clear(); unsigned int count = 0; ar & count; for (unsigned int i=0; i(t.size()); ar & count; Iterator it = t.begin(); for (unsigned int i=0; i