FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
template<class C , typename F1 , typename F2 >
PropertyFunctors FB::make_property ( C *  instance,
F1  getter,
F2  setter 
)
inline

Generate read-write property functors for use with registerProperty() of FB::JSAPIAuto.

struct X : JSAPIAuto {
long m_answer;
long get_answer() const { return m_answer; }
void set_answer(long answer) { m_answer = answer; }
X() : m_answer(42) {
registerProperty("answer",
make_property(this, &X::get_answer, &X::set_answer));
}
};
See Also
JSAPI

Definition at line 144 of file PropertyConverter.h.

145  {
146  return PropertyFunctors(
147  FB::detail::properties::getter<C, F1>::result::f(instance, f1),
148  FB::detail::properties::setter<C, F2>::result::f(instance, f2));
149  }