Foxit PDF SDK

Public Member Functions | List of all members
FSDK.Int32Array Class Reference

## Public Member Functions
| Add (new_element)
| Add an element at the tail. Potentially growing the array. More...
| constructor ()
| Constructor.
| Find (data, start)
| Find an element from specified position to last. More...
| GetAt (index)
| This method retrieves an element specified by an index number. More...
| InsertAt (index, new_element, count)
| Inset one or more continuous element at specified position. More...
| InsertAt (start_index, new_array)
| Inset an array at specified position. More...
GetSize() | RemoveAll ()
| Get the number of elements in the array. More...
| RemoveAt (index, count)
| Remove a number of elements at specified position. More...
| SetAt (index, new_element)
| This method overwrites an element specified by an index number. More...
| SetAtGrow (index, new_element)
| Set an element value at specified position. Potentially growing the array. More...

## Member Function Documentation

## ◆ Add()

FSDK.Int32Array.Add | ( | new_element |  | ) |

Add an element at the tail. Potentially growing the array.

Parameters

  [in] | new_element | The input element.

Returns
  true means success, while false means failure (such as memory error).

## ◆ Find()

FSDK.Int32Array.Find | ( | data | ,
|  | start |
| ) |  |

Find an element from specified position to last.

Parameters

  [in] | data | The input element.
  [in] | start | Specifies the zero-based index of start element to find.

Returns
  An index of the found element. -1 means found none.

## ◆ GetAt()

FSDK.Int32Array.GetAt | ( | index |  | ) |

This method retrieves an element specified by an index number.

Parameters

  [in] | index | Specifies the zero-based index of the element.

Returns
  An element.

## ◆ InsertAt() [1/2]

FSDK.Int32Array.InsertAt | ( | index | ,
|  | new_element | ,
|  | count |
| ) |  |

Inset one or more continuous element at specified position.

Parameters

  [in] | index | Specifies the zero-based index in the array.
  [in] | new_element | Specifies the element value to insert.
  [in] | count | Specifies the count of the element to insert.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ InsertAt() [2/2]

FSDK.Int32Array.InsertAt | ( | start_index | ,
|  | new_array |
| ) |  |

Inset an array at specified position.

Parameters

  [in] | start_index | Specifies the zero-based index of start element to insert at.
  [in] | new_array | The input array.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ RemoveAll()

GetSize () FSDK.Int32Array.RemoveAll | ( |  | ) |

Get the number of elements in the array.

Returns
  The number of elements in the array.

Get the upper bound in the array, actually the maximum valid index.

Returns
  The upper bound.

Change the allocated size and the grow amount.

Parameters

  [in] | new_size | The new size in elements expected.
  [in] | grow_by | The grow amount in elements expected. This can be -1 for the grow amount unchanged.

Returns
  true means success, while false means failure (such as parameter or memory error).

Clean up the array.

Returns
  None.

## ◆ RemoveAt()

FSDK.Int32Array.RemoveAt | ( | index | ,
|  | count |
| ) |  |

Remove a number of elements at specified position.

Parameters

  [in] | index | Specifies the zero-based index in the array.
  [in] | count | Specifies the count of element to remove.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ SetAt()

FSDK.Int32Array.SetAt | ( | index | ,
|  | new_element |
| ) |  |

This method overwrites an element specified by an index number.

Parameters

  [in] | index | Specifies the zero-based index of the element.
  [in] | new_element | An element.

Returns
  true means success, while false means failure.

## ◆ SetAtGrow()

FSDK.Int32Array.SetAtGrow | ( | index | ,
|  | new_element |
| ) |  |

Set an element value at specified position. Potentially growing the array.

Parameters

  [in] | index | Specifies the zero-based index of element in the array.
  [in] | new_element | The input element.

Returns
  true means success, while false means failure.