company logo

Value :: open - Open value handle

The function opens a value handle for a persistent or transient attribute. Usually, value handles are opened when being constructed. You can, however, create an unopened (invalid) value handle using the dummy constructor (without parameters) or by closing another value handle.

When applying the function to a value handle that has been opened already, the handle is closed implicitly before reopening.

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. Create value handle for a 64-bit integer value
    odaba::Value & Value  :: open ( int64 i64Value )

    The function opens an application transient value handle for a platform independent 64-bit integer value (int64, INT(17)).

    • i64Value - Big integer value

      Big integer values are 64 bit integer values.

  2. to list
  3. Create value handle for Boolean value
    odaba::Value & Value  :: open ( bool bValue )

    The function opens an application transient value handle for a bool value (LOGICAL).

    • bValue - Boolean value

      Valid values for Boolean values are true and false.

  4. to list
  5. Open value handle for a time value
    odaba::Value & Value  :: open ( odaba::Time &cTime )

    The function opens an application transient value handle for a time value (TIME).

    • cTime - Time value

      The time value is passed in the ODABA Interface::Time format and provides time in 1/100th seconds.

  6. to list
  7. Open value handle for a date value
    odaba::Value & Value  :: open ( odaba::Date &cDate )

    The function opens an application transient value handle for a date value (DATE).

    • cDate - Date

      The date contains day, month and year, but not the time.

  8. to list
  9. Open value handle for a date/time value
    odaba::Value & Value  :: open ( odaba::DateTime &cDateTime )

    The function opens an application transient value handle for a timestamp value (DateTime).

    • cDateTime - Time stamp

      A time stamp combines date and time

  10. to list
  11. Open value handle for a double value
    odaba::Value & Value  :: open ( double vDouble )

    The function opens an application transient value handle for a double value (REAL(15)).

    • vDouble - Double value
  12. to list
  13. Open property handle for transient instance
    odaba::Value & Value  :: open ( odaba::ObjectSpace &cObjectSpace, odaba::String &sTypeName )

    The function creates a single transient instance of complex data type passed in sTypeNames. When the type name is part of an active namespace, the type name has to be passed as scoped name (e.g. "MyProj::Person").

    • cObjectSpace - Object space reference

      The reference refers to an opened or not opened object space handle.

    • sTypeName - Type name

      The type name is the name of a data type (usually) defined in the database. The type name might be passed as simple identifier or as scoped name with preceding namespace names separated by double colon '::'.

      In order to pass no type name, an empty string ( String() ) may be passed.

  14. to list
  15. Open value handle for a 32-bit integer value
    odaba::Value & Value  :: open ( int32 iValue )

    The function opens an application transient value handle for a platform independent 32-bit integer value (int32, INT(10)).

    • iValue - Integer value

      The value is passed as platform independent 32-bit integer value.

  16. to list
  17. Open value handle for fixed string value
    odaba::Value & Value  :: open ( odaba::String &sString, int32 iLength )

    The function opens an application transient value handle for a string value (STRING). The string area is allocated with the size passed in iLength. The string is copied into the instance area owned by the value handle.

    In order to create variable size text values, open(sString) should be used, instead.

    • sString - String value
    • iLength - Length

      The length is the size allocated for an instance or area.

  18. to list
  19. Open an undefined value handle
    odaba::Value & Value  :: open (  )

    The function opens an invalid value handle. Before using the handle handle definition and instance area has to be set (open(...))..

  20. to list
  21. - internal feature (not documented)
    odaba::Value & Value  :: open ( odaba::Instance &cInstance )
    • cInstance - Instance

      The instance is passed as String, which is structured as ESDF data (object interchange format).

  22. to list
  23. - internal feature (not documented)
    odaba::Value & Value  :: open ( odaba::Key &cKey )
    • cKey - Key value

      A key value is the key definition and a value for the key. The key value is typically provided in ESDF format. Other formats might be set (OIF, XML)

  24. to list
  25. - internal feature (not documented)
    odaba::Value & Value  :: open ( odaba::Property &cProperty, odaba::String &vAccessPath )
    • cProperty - Property reference

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

    • vAccessPath - Access path

      An access path may simply refer to an extent or property, but also to a calculated result. Thus, an access path may contain just a name, but also a sequence of path elements separated by '.' in order to refer to far properties or complex operations.

      The access path may start with two dots (.), which indicates, that the path starts in an upper property handle. One dot indicates, that the path starts in the current property handle. This distinction becomes necessary, when a property has the same name as an extent. To access a property in this case, one dot must precede the property name. The first dot can be omitted, when the property name is not an extent name.

      Forcing to a path to start in a parent property handle requires two dots (..), the parents parent three and so on.

      In order to pass no access path, an empty string ( String() ) has to be passed.

      address.street      // property path

      .address.street     // property path

      ..address.street    // address in parent property instance

      children(0).Age()   // operation path

      Person().children() // path property

      children('Anton')   // path property

  26. to list
  27. Open value handle for a string value
    odaba::Value & Value  :: open ( odaba::String &sString )

    The function opens an application transient value handle for a string value (STRING). The string area is allocated with the current size of the string passed in sString. The string is copied into the instance area owned by the value handle.

    In order to create fixed size text values, open(sString,iLength) should be used.

    • sString - String value
  28. to list
  29. - internal feature (not documented)
    odaba::Value & Value  :: open ( odaba::TypeDefinition &cTypeDefinition )
    • cTypeDefinition - Type definition

      Type definition refers to a type descriptor for a complex data type (structure), view or enumeration.

  30. to list
  31. - internal feature (not documented)
    odaba::Value & Value  :: open ( odaba::Value &cValue, odaba::String &vAccessPath )
    • cValue - Value handle

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

    • vAccessPath - Access path

      An access path may simply refer to an extent or property, but also to a calculated result. Thus, an access path may contain just a name, but also a sequence of path elements separated by '.' in order to refer to far properties or complex operations.

      The access path may start with two dots (.), which indicates, that the path starts in an upper property handle. One dot indicates, that the path starts in the current property handle. This distinction becomes necessary, when a property has the same name as an extent. To access a property in this case, one dot must precede the property name. The first dot can be omitted, when the property name is not an extent name.

      Forcing to a path to start in a parent property handle requires two dots (..), the parents parent three and so on.

      In order to pass no access path, an empty string ( String() ) has to be passed.

      address.street      // property path

      .address.street     // property path

      ..address.street    // address in parent property instance

      children(0).Age()   // operation path

      Person().children() // path property

      children('Anton')   // path property

  32. to list
  33. Open cursor copy for a property handle
    odaba::Value & Value  :: open ( odaba::Value &cValue )

    The function creates a copy of the value handle passed in cValue. Both, the copy and the origin, share the the value instance, i.e. changing the value in one of the value handles will automatically change the value in the other.

    • cValue - Value handle

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

  34. to list