company logo

Binary :: insert - Insert data into binary data block

The function inserts binary data at position passed in iPosition and returns a reference to the current binary data block. The position passed passed in iPosition must be within the used data, that means between 0 and length().

Otherwise the function throws an exception.

Return value:  Binary data block handle ( odaba::Binary & )

Constant reference to a binary data block handle, which may contain binary data up to 2 GB.

Implementation overview

Implementation details

  1. Insert byte value(s) into data block
    odaba::Binary & Binary  :: insert ( int32 iPosition, int32 iValue, int32 iCount )

    The function iCount times inserts the byte value passed in iValue at position iPosition. iValue must not be below 0 and above 255. Otherwise, the function throws an exception. An exception is also thrown, when iCount is less than zero.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • iValue - Integer value

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

    • iCount - Number of items

      The value contains the number of items to be processed or stored in a collection.

  2. to list
  3. Insert binary data into a binary data block
    odaba::Binary & Binary  :: insert ( int32 iPosition, odaba::Binary &cBinary )

    The function inserts binary data passed in cBinary at position passed in iPosition and returns a reference to the current binary data block.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • cBinary - Binary data block handle

      Constant reference to a binary data block handle, which may contain binary data up to 2 GB.

  4. to list