company logo

Property :: value - Provide value handle

The function returns the value handle for the property, which typically refers to attribute or MEMO properties. One may also access the instance selected in the property handle as value, e.g. in order to create a string instance from the selected instance. Since the property handled by the value handle may change for variable parent instances, values are not checked when being provided. When accessing values, later on, an instance has to be selected for the value.

Especially, when referring to transient references you have to take into account that the data source referenced by a transient reference may change during processing. This affects the type of referenced instances as well as the referenced collection or instance.

When the property could not be found or when the current property handle is not valid, the function throws an exception. Otherwise it returns the subordinated value.

Return value:  Value handle ( odaba::Value & )

A value handle refers to a (usually) opened value. Invalid value handles may cause an exception.

Implementation overview

Implementation details

  1. Get value handle
    odaba::Value Property  :: value (  )

    In order to perform value operations, a property handle can be turned into a value handle. The function returns the current property handle as value handle.

    The value handle is not checked as such, but when the property handle is not valid, the function throws an exception. Before calling value handle functionality, an instance has to be selected in the property handle.

    ... fragment ( Property &person ) {

      Application::output(person.get("P0001").value().toInstance());

    }

  2. to list
  3. Provide value for property path
    odaba::Value Property  :: value ( odaba::String &vSimplePath )

    The function returns the value handle for the property path passed in vSimplePath . The function returns values within a complex data type instance (e.g. direction.city , where city is an attribute of the embedded Address type of direction ) as well as paths that include references ( mother.name , where mother is a reference to a persons mother). You must not pass path properties or operation paths to the function, i.e. the path must not refer to operations or selectors or to iteration operators ( mother(0).name is not a valid path).

    When the property could not be found, the function throws an exception.

    • vSimplePath - Simple property path

      A simple property path may contain an extent or property name but also a sequence of property names separated by dot. A simple property path must not contain parenthesis or preceding dots.

  4. to list