X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbindable.h;fp=source%2Fbindable.h;h=000234515aeeea4a5b38effe0bf27173251b8896;hp=d85ec78daac037710390a7949c1deb164c3dbb51;hb=c473f9193d3e5088772b6e5ebf53b710e2976a92;hpb=020811d96d5c823686e5c2b0a392b95d1a321f05 diff --git a/source/bindable.h b/source/bindable.h index d85ec78d..00023451 100644 --- a/source/bindable.h +++ b/source/bindable.h @@ -98,11 +98,21 @@ private: Base *binder; public: + template + Bind(const T &o, bool r = false): + binder(r ? create(&o, T::current()) : create(&o)) + { } + template Bind(const T *o, bool r = false): binder(r ? create(o, T::current()) : create(o)) { } + template + Bind(T *o, bool r = false): + binder(r ? create(o, T::current()) : create(o)) + { } + private: Bind(const Bind &); Bind &operator=(const Bind &);