Key :: operator= - Assignment operator
In order to assign key values by assignment operator (=), this operator has been provided.
In an environment not supporting operator overloading, use the assign() function instead.
Implementation overview
- Create copy for key
Key :: operator= ( cKey ) - Create key from string
Key :: operator= ( cString )
Implementation details
-
Create copy for key
odaba::Key & Key  :: operator= ( odaba::Key &cKey )
The function duplicates the string value and the type definition from the typed string passed in cKey. When the type definition is valid, the string will be converted into an internal key.
- 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)
to list
- cKey
- Key value
-
Create key from string
odaba::Key & Key  :: operator= ( odaba::String &cString )
The function creates a key from the string passed in cString. The string is copied to the key. 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).
to list
- cString
- Constant string object