Skip to end of metadata
Go to start of metadata

void FB::JSAPISimple::registerMethod ( const std::string &  name,
CallMethodPtr  func 
) [virtual]

Register a method to be exposed to javascript.

All methods exposed to javascript through JSAPISimple must match the FB::CallMethodPtr function pointer type. Example:

    registerMethod( "toString", (CallMethodPtr)&JSAPISimple::callToString );
 @code
      
 This matches the following definition:
 @code
      variant callToString(const std::vector<variant>& args);
Parameters:
name The name that the method should be exposed to javascript as
func The function that should be called to handle the javascript method

Definition at line 80 of file JSAPISimple.cpp.

00081 {
00082     m_methodMap[name].callFunc = func;
00083 }


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