persistence/persistent_pair.hpp

    1: #ifndef STLPLUS_PERSISTENT_PAIR
    2: #define STLPLUS_PERSISTENT_PAIR
    3: ////////////////////////////////////////////////////////////////////////////////
    4: 
    5: //   Author:    Andy Rushton
    6: //   Copyright: (c) Andy Rushton, 2007
    7: //   License:   BSD License, see ../docs/license.html
    8: 
    9: //   Persistence of STL pair
   10: 
   11: ////////////////////////////////////////////////////////////////////////////////
   12: #include "persistence_fixes.hpp"
   13: #include "persistent_contexts.hpp"
   14: #include <map>
   15: 
   16: ////////////////////////////////////////////////////////////////////////////////
   17: 
   18: namespace stlplus
   19: {
   20: 
   21:   template<typename V1, typename V2, typename D1, typename D2>
   22:   void dump_pair(dump_context&, const std::pair<V1,V2>& data, D1 dump_fn1, D2 dump_fn2)
   23:     throw(persistent_dump_failed);
   24: 
   25:   template<typename V1, typename V2, typename R1, typename R2>
   26:   void restore_pair(restore_context&, std::pair<V1,V2>& data, R1 restore_fn1, R2 restore_fn2)
   27:     throw(persistent_restore_failed);
   28: 
   29: } // end namespace stlplus
   30: 
   31:   ////////////////////////////////////////////////////////////////////////////////
   32: #include "persistent_pair.tpp"
   33: #endif