FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
variant JSAPISimple::GetProperty ( const std::string &  propertyName)
virtual

Gets a property value.

Parameters
propertyNameName of the property.
Returns
The property value

Implements FB::JSAPI.

Definition at line 121 of file JSAPISimple.cpp.

122 {
123  if (!m_valid)
124  throw object_invalidated();
125 
126  PropertyMap::const_iterator fnd = m_propertyMap.find(propertyName);
127  if (fnd != m_propertyMap.end() && fnd->second.getFunc != NULL) {
128  return (this->*fnd->second.getFunc)();
129  } else {
130  throw invalid_member(propertyName);
131  }
132 }
Thrown by a JSAPI object when a call is made on it after the object has been invalidated.
Definition: JSExceptions.h:69
Thrown when an Invoke, SetProperty, or GetProperty call is made for a member that is invalid (does no...
Definition: JSExceptions.h:83