company logo

Property :: readBuffer - Fill instance buffer from position

The function is called in order to explicitly fill buffer instances for buffered access. Instances are read before or after the the last instance selected in the property handle depending on the value passed in iDirection, which determines the direction for filling the buffer. When no instance is selected, the buffer is filled beginning with the first or last instance in the collection.

When passing 1 in iDirection, instances are read forward. Passing -1 causes the function to read backward.

When reading the last instances in a collection the buffer might not be filled completely. The number of instances read into the buffer is returned from the function.

The function resets the selection in the property handle. In case of an error (e.g. read error), the function throws an exception.

Return value:  Number of items ( int32  )

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

Implementation details

int32 Property  :: readBuffer ( int32 iDirection )
  • iDirection - Direction for position

    When direction is positive, the operation positions forward. For a negative value, the operation works backward.