39 template <
typename Key,
typename Value,
typename Comparator,
typename Allocator>
40 void CoherentBindInternal(Binder* binder,
41 std::map<Key, Value, Comparator, Allocator>& value)
43 binder->MapBegin(value.size());
44 typedef typename std::map
45 <Key, Value, Comparator, Allocator>::const_iterator Iterator;
47 Iterator end = value.end();
48 for (Iterator i = value.begin(); i != end; ++i)
50 CoherentBindInternal(binder, i->first);
51 CoherentBindInternal(binder, i->second);
57 template <
typename Key,
typename Value,
typename Comparator,
typename Allocator>
58 void CoherentBindInternal(Binder* binder,
60 <Key, Value, Comparator, Allocator>& value)
62 binder->MapBegin(value.size());
63 typedef typename std::map
64 <Key, Value, Comparator, Allocator>::const_iterator Iterator;
66 Iterator end = value.end();
67 for (Iterator i = value.begin(); i != end; ++i)
69 CoherentBindInternal(binder, i->first);
70 CoherentBindInternal(binder, i->second);
76 template <
typename Key,
typename Value,
typename Comparator,
typename Allocator>
77 void CoherentReadInternal(Binder* binder,
78 std::map<Key, Value, Comparator, Allocator>& value)
80 size_t size = binder->ReadMapBegin();
82 typedef typename std::map
83 <Key, Value, Comparator, Allocator>::value_type
ValueType;
85 for (
size_t i = 0; i < size; ++i)
89 binder->ReadKeyValuePair();
90 CoherentReadInternal(binder, key);
91 CoherentReadInternal(binder, mapValue);
Contains almost all Coherent namespaces, classes and functions.
Definition: DataStorage.h:38
ValueType
The primitive types coming from JS.
Definition: Binder.h:43