[data_binding] Lets bind data

8 Apr
2009
8 Apr
'09
3:10 p.m.
Hi, I am looking for interest in data_binding techniques in C++. The idea is to have a class that could bind to a list of data and when ever any of them is changed the value of the binder is changed too: data_bindee<mpz_class> x; data_bindee<mpz_class> y; typedef tuple<mpz_class,mpz_class> my_bind_tuple_type; struct my_bind_pred_type { template<typename BinderT> void operator(BinderT& me, my_bind_tuple_typeT t) { me.x = get<0>(t); me.y = 2 * get<0>(t); } }; data_binder<struct { mpz_class x,y; }, my_bind_tuple_type, my_bind_pred_type> point(x, y); // when ever data of x and y is changed the value of point // is updated too. Any suggestions?? Kasra With Best Regards -- Kasra Nassiri
5910
Age (days ago)
5910
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kasra