FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
public void FB::JSAPIProxy::changeObject ( const FB::JSAPIPtr inner)

Changes the wrapped JSAPIPtr to the given one.

Parameters
innerconst FB::JSAPIPtr & New JSAPIPtr
Since
1.4a3

Definition at line 108 of file JSAPIProxy.cpp.

References FB::ptr_cast().

109 {
110  if (FB::JSAPIImplPtr ptr = FB::ptr_cast<FB::JSAPIImpl>(m_apiWeak.lock())) {
111  ptr->unregisterProxy(shared_from_this());
112  }
113  this->m_api = inner;
114  this->m_apiWeak = inner;
115  FB::JSAPIImplPtr ptr = FB::ptr_cast<FB::JSAPIImpl>(inner);
116  if (ptr)
117  ptr->registerProxy(shared_from_this());
118 }
JavaScript API base class implementation – provides basic functionality for C++ JSAPI objects...
Definition: JSAPIImpl.h:49
boost::shared_ptr< T > ptr_cast(boost::shared_ptr< U > const &r)
Convenience function for doing a dynamic cast of one boost::shared_ptr to another.
Definition: APITypes.h:339

Here is the call graph for this function: