FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
bool JSAPISimple::HasProperty ( int  idx) const

Query if the property at "idx" exists.

This can be used for providing array-style access on your object. For example, the following will result in a call to HasProperty with idx = 12:

idxZero-based index of the property to check for
true if property exists, false if not.

Implements FB::JSAPI.

Definition at line 155 of file JSAPISimple.cpp.

156 {
157  if (!m_valid)
158  throw object_invalidated();
160  // By default do not support indexing
161  // To use array style access, override this method in your API object
162  return false;
163 }
Thrown by a JSAPI object when a call is made on it after the object has been invalidated.
Definition: JSExceptions.h:69