persistence/persistent_map.hpp

    1: #ifndef STLPLUS_PERSISTENT_MAP
    2: #define STLPLUS_PERSISTENT_MAP
    3: ////////////////////////////////////////////////////////////////////////////////
    4: 
    5: //   Author:    Andy Rushton
    6: //   Copyright: (c) Andy Rushton, 2007
    7: //   License:   BSD License, see ../docs/license.html
    8: 
    9: //   Persistence for STL map
   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 K, typename T, typename P, typename DK, typename DT>
   22:   void dump_map(dump_context&, const std::map<K,T,P>& data, DK key_dump_fn, DT val_dump_fn)
   23:     throw(persistent_dump_failed);
   24: 
   25:   template<typename K, typename T, typename P, typename RK, typename RT>
   26:   void restore_map(restore_context&, std::map<K,T,P>& data, RK key_restore_fn, RT val_restore_fn)
   27:     throw(persistent_restore_failed);
   28: 
   29: } // end namespace stlplus
   30: 
   31:   ////////////////////////////////////////////////////////////////////////////////
   32: #include "persistent_map.tpp"
   33: #endif