static const T *cur_obj;
Bindable() { }
+ ~Bindable() { if(cur_obj==this) T::unbind(); }
static bool set_current(const T *obj)
{
template<typename T>
class BindableWithDefault: protected Bindable<T>
{
+ friend class Bindable<T>;
+
protected:
BindableWithDefault() { }
+ ~BindableWithDefault() { if(this==&default_object()) Bindable<T>::set_current(0); }
public:
static const T *current()