aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/serializer/map.cxx
blob: cd4c34cbba05452c2e8e66e3b427753a14c99fd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// file      : xsde/cxx/serializer/map.cxx
// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
// license   : GNU GPL v2 + exceptions; see accompanying LICENSE file

#include <xsde/cxx/serializer/map.hxx>

namespace xsde
{
  namespace cxx
  {
    namespace serializer
    {
      // serializer_map
      //
      serializer_map::
      ~serializer_map ()
      {
      }

      // serializer_map_impl
      //
      void serializer_map_impl::
      reset () const
      {
        if (resetting_)
          return;

        bool& r = const_cast<bool&> (resetting_);
        r = true;

        for (hashmap::const_iterator i (map_.begin ()), e (map_.end ());
             i != e; ++i)
        {
          serializer_base* s = *static_cast<serializer_base* const*> (*i);
          s->_reset ();
        }

        r = false;
      }
    }
  }
}