Skip to end of metadata
Go to start of metadata

void FB::JSAPIAuto::registerProperty ( const std::string &  name,
const PropertyFunctors propFuncs 
) [virtual]

Register property to be exposed to javascript.

To provide a property called "IsFinished" that javascript can access, you need two methods:

      bool get_IsFinished();
      void set_IsFinished(bool newVal);

Then in the constructor of your class that extends JSAPIAuto (we'll call it MyPluginAPI), you register it like so:

      registerProperty("IsFinished", make_property(this, &MyPluginAPI::get_IsFinished, &MyPluginAPI::set_IsFinished));

To register a property that is read- or write-only, simply provide "NULL" for the getter or setter function when registering the property.

Parameters:
name The name.
propFuncs The property funcs.

Definition at line 102 of file JSAPIAuto.cpp.

References FB::JSAPIImpl::getZone().

00103 {
00104     boost::recursive_mutex::scoped_lock lock(m_zoneMutex);
00105     m_propertyFunctorsMap[name] = propFuncs;
00106     m_zoneMap[name] = getZone();
00107 }

Here is the call graph for this function:


Generated on 17 Jun 2013 for FireBreath by  doxygen 1.6.1
Labels
  • None