company logo

PropertyDefinition :: hasType - Does a collection have an index?

The function checks whether a type definition exists for the property ( true ) or not ( false ). The function may be called in order to check, whether the type definition exists before calling typeDefinition() . Typically, properties with elementary type do not provide a type definition, but typeName() or internal typeId() .

When the function is called with an invalid property definition, it throws an exception.

... fragment ( Property &person ) {

  PropertyDefinition   pd(person.propertyDefinition());

  if ( pd.hasType() )

    Application::output(pd.typeDefinition().name());

}

Return value:  Success ( bool  )

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

Implementation details

bool PropertyDefinition  :: hasType (  )