35 #include "Coherent/UI/Binding/Binder.h"
42 template <
typename T,
typename A>
43 void CoherentBindInternal(Binder* binder, TArray<T, A>& value)
45 binder->ArrayBegin(value.Num());
46 typedef typename TArray<T, A>::TConstIterator Iterator;
48 for (Iterator i = value.CreateConstIterator(); i; ++i)
50 CoherentBindInternal(binder, *i);
56 template <
typename T,
typename A>
57 void CoherentBindInternal(Binder* binder,
const TArray<T, A>& value)
59 binder->ArrayBegin(value.Num());
60 typedef typename TArray<T, A>::TConstIterator Iterator;
62 for (Iterator i = value.CreateConstIterator(); i; ++i)
64 CoherentBindInternal(binder, *i);
70 template <
typename T,
typename A>
71 void CoherentReadInternal(Binder* binder, TArray<T, A>& value)
73 size_t size = binder->ReadArrayBegin();
77 for (
size_t index = 0; index != size; )
79 binder->ReadArrayElement(index++);
81 CoherentReadInternal(binder, IndexedValue);
83 value.Push(IndexedValue);
86 binder->ReadArrayEnd();