company logo

TypedString :: operator= - Assign typed string value

Several ways of assigning string values to a typed string are supported. When assigning a typed string by passing a string value, the string type is determined from the string value passed.

In an environment not supporting operator overloading, use the assign() function instead.

Implementation overview

Implementation details

  1. Create copy for typed string
    odaba::TypedString & TypedString  :: operator= ( odaba::TypedString &cTypedString )

    The function duplicates the string value and the type definition from the typed string passed in cTypedString. When the type definition is valid, the string will be converted into the internal format.

    • cTypedString - Typed string

      A typed string string contains data in the object interchange format (OIF). Typed strings are used for passing key or instance values.

  2. to list
  3. Create typed string from string
    odaba::TypedString & TypedString  :: operator= ( odaba::String &cString )

    The function creates a typed string from the string value passed in cString. The string is copied to the typed string. The string type is determined for the string value. When the string does not correspond to any type, the function throws an exception.

    The string value is not validated when creating the type string, but will be validated later on, when applying to a complex data type.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

  4. to list