company logo

Property :: isParentOf - Is property handle parent

The function checks, whether the current property handle is the parent for the property handle passed to the function. Especially for weak-typed or transient reference the function is able to detect, whether the passed property handle is still valid in the application context or not.

Sub-handles for weak-typed parents are automatically updated, when the parent's type changes.

When changing the property handle for a transient property handle, reopen events are generated but subordinated property handles are not updated automatically. Moreover, sub property handles are still valid in the property handle hierarchy, but not in the application context. The function detects this type of inconsistency and enables the application to react.

The function throws an exception, when one of the property handles passed is invalid.

  if ( !parent.isParentOf(my_ph) )

    my_ph.open(parent,prop_path); // property path is known by the application

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Property  :: isParentOf ( odaba::Property &cProperty )
  • cProperty - Property reference

    A property handle refers to a (usually) opened property. Invalid properties may cause an exception.