; Functions\Initialization.au3
; ----------------------------
; FGA_GeneralInitDll      Load compiled code from C++ DLL file.
; FGA_GeneralInitVbSrc    Compile and load .NET code from source file.
; FGA_GeneralInitVbDll    Load .NET code from .NET assembly DLL file.

; Functions\Conversions.au3
; ----------------------------
; FGA_Array1DTo2D         Convert a 1D array to a 2D array with one column.
; FGA_Array2DTo1D         Convert a 2D array with one column to a 1D array.
; FGA_IntStructToArray    Convert a DllStruct of integers to a 1D array.

; Functions\ReadWrite.au3
; ----------------------------
; FGA_ArrayWrite          Write a 1D/2D array to disk as binary data. Optimized C++ code.
; FGA_ArrayWriteAu3       Write a 1D/2D array to disk as binary data. Pure AutoIt code.
; FGA_ArrayRead           Read a 1D/2D array from disk files. Optimized C++ code.
; FGA_ArrayReadAu3        Read a 1D/2D array from disk files. Pure AutoIt code.

; Functions\RowFuncs.au3
; ----------------------------
; FGA_RowsAdd             Add one or more new rows to the end of an existing 1D or 2D array.
; FGA_RowsAllocate        Allocate more space in a 1D or 2D array by inserting one or more empty rows
;                         at the specified (row) indices.
; FGA_RowsClear           Clear (blank) one or more rows at the specified (row) indices in a 1D or 2D array.
; FGA_RowsDelete          Delete one or more rows at the specified (row) indices in a 1D or 2D array.
; FGA_RowsExtract         Extract one or more rows at the specified (row) indices in a 1D or 2D array,
;                         and return the extracted rows as a new 1D or 2D array.
; FGA_RowsInsert          Insert one or more new rows at the specified (row) indices in a 1D or 2D array.
; FGA_RowsMove            Move one or more rows from one to another position in a 1D or 2D array.

; Functions\ColumnFuncs.au3
; ----------------------------
; FGA_ColumnsAdd          Add one or more new columns after last column in an existing 2D array.
; FGA_ColumnsAllocate     Allocate more space in a 2D array by inserting one or more empty columns
;                         at the specified (column) indices.
; FGA_ColumnsClear        Clear (blank) one or more columns at the specified (column) indices in a 2D array.
; FGA_ColumnsDelete       Delete one or more columns at the specified (column) indices in a 2D array.
; FGA_ColumnsExtract      Extract one or more columns at the specified (column) indices in a 2D array,
;                         and return the extracted columns as a new 2D array.
; FGA_ColumnsInsert       Insert one or more new columns at the specified (column) indices in a 2D array.
; FGA_ColumnsMove         Move one or more columns from one to another position in a 2D array.


; Functions\Initialization.au3
; ----------------------------
; Load compiled code from C++ DLL file
; The DLL file must be specified with a full path
; Or it must be specified with a path relative to the running script
; Or it must be placed in the same folder as the running script
;
; If you're having trouble loading a DLL file, copy the DLL file to the same
; folder as the running script, and compile the script into an EXE file.
;
;     @error:    1 = $sDllPath is not specified and "General.dll" or
;                    "General_x64.dll" is not located with the running script
;                2 = "General.dll" or "General_x64.dll" cannot be found in $sDllPath
FGA_GeneralInitDll( $sDllPath = "" ) ; $sDllPath must be the path WITHOUT DLL filename

; Compile and load .NET code from a source file
; The source file must be specified with a full path
; Or it must be specified with a path relative to the running script
FGA_GeneralInitVbSrc( $sSrcPath )

; Load .NET code from a .NET assembly DLL file
; The DLL file must be specified with a full path
; Or it must be specified with a path relative to the running script
; Or it must be placed in the same folder as the running script
;
; If you're having trouble loading a DLL file, copy the DLL file to the same
; folder as the running script, and compile the script into an EXE file.
FGA_GeneralInitVbDll( $sDllPath = "" )


; Functions\Conversions.au3
; ----------------------------
; Convert a 1D array to a 2D array with one column
FGA_Array1DTo2D( $aArray1D )

; Convert a 2D array with one column to a 1D array
FGA_Array2DTo1D( $aArray2D )

; Convert a DllStruct of integers to a 1D array
FGA_IntStructToArray( $tInts )


; Functions\ReadWrite.au3
; ----------------------------
; Writes a 1D/2D array to disk as binary data
; Uses optimized C++ code in FGA_ArrayWriteMtd to write array
;     @error:    1 = $sFile is an invalid file name
;                2 = $sFile exists and $bOverWrite is False
;                3 = $aArray is not an array or is a larger than 2D array
;                4 = String buffer $iStrBufSize is too small
;                5 = FGA_GeneralInitDll has not been run
FGA_ArrayWrite( _
  $sFile, _           ; Name of the disk files, 3 files
  $aArray, _          ; The 1D/2D array to write to disk
  $iStrBufSize = 1, _ ; Maximum size in megabytes of buffer to store strings
  $bOverWrite = 0 )   ; True (1) to overwrite existing files

; Writes a 1D/2D array to disk as binary data
;     @error:    1 = $sFile is an invalid file name
;                2 = $sFile exists and $bOverWrite is False
;                3 = $aArray is not an array or is a larger than 2D array
;                4 = String buffer $iStrBufSize is too small
FGA_ArrayWriteAu3( _
  $sFile, _           ; Name of the disk files, 3 files
  $aArray, _          ; The 1D/2D array to write to disk
  $iStrBufSize = 1, _ ; Maximum size in megabytes of buffer to store strings
  $bOverWrite = 0 )   ; True (1) to overwrite existing files

; Reads a 1D/2D array from disk files
; The disk files must have been saved with FGA_ArrayWrite
; Uses optimized C++ code in FGA_ArrayReadMtd to read array
;     @error:    1 = $sFile is an invalid file name
;                2 = $sFile (3 files) does not exist
;                3 = Invalid dims/rows/cols info in <$sFile>.ini
;                4 = Size of <$sFile>.bin doesn't match rows/cols
;                5 = FGA_GeneralInitDll has not been run
FGA_ArrayRead( $sFile ) ; Name of the disk files, 3 files

; Reads a 1D/2D array from disk files
; The disk files must have been saved with FGA_ArrayWrite
;     @error:    1 = $sFile is an invalid file name
;                2 = $sFile (3 files) does not exist
;                3 = Invalid dims/rows/cols info in <$sFile>.ini
;                4 = Size of <$sFile>.bin doesn't match rows/cols
FGA_ArrayReadAu3( $sFile ) ; Name of the disk files, 3 files


; Functions\RowFuncs.au3
; ----------------------------
; Add one or more new rows to the end of an existing 1D or 2D array
; FGA_RowsAdd( _
;     ByRef $aArray, _ ; The 1D or 2D array to add rows to.
;     $vRows )         ; The new rows to add to $aArray. This can be a single value or a 1D array of values if $aArray is a 1D array.
;                      ; Or it can be a 2D array if $aArray is a 2D array. Number of columns in $vRows MUST match the columns in $aArray.
;
;     @error:    1 = $aArray is not a 1D or 2D array
;                2 = $vRows is not a valid specification of rows to add to $aArray
;                3 = Mismatch between $aArray and $vRows
;                    Number of columns in $vRows must match number of columns in $aArray
;                5 = C++ code is not initialized
FGA_RowsAdd( _
  ByRef $aArray, _ ; The 1D or 2D array to add rows to.
  $vRows )         ; The new rows to add to $aArray. This can be a single value, a 1D array or a 2D array.

; Allocate more space in a 1D or 2D array by inserting one or more empty rows at the specified (row) indices
; FGA_RowsAllocate( _
;     ByRef $aArray, _ ; The 1D or 2D array to allocate space in.
;     $vIndex )        ; The (row) indices in $aArray where the empty rows are inserted. This can be a single index, a 1D array of in-
;                      ; dices or a 2D array of "index/number of rows" pairs. Indices must be in ascending order but can be duplicated.
;
;     @error:    1 = $aArray is not a 1D or 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/rows
;                3 = Mismatch between $aArray and $vIndex
;                    Indices in $vIndex must be in ascending order and smaller than number of rows in $aArray
;                5 = C++ code is not initialized
FGA_RowsAllocate( _
  ByRef $aArray, _ ; The 1D or 2D array to allocate space in.
  $vIndex )        ; The (row) indices in $aArray where the empty rows are inserted.

; Clear (blank) one or more rows at the specified (row) indices in a 1D or 2D array
; FGA_RowsClear( _
;     ByRef $aArray, _ ; The 1D or 2D array to clear (blank) rows in.
;     $vIndex )        ; The (row) indices in $aArray of the rows to clear. This can be a single
;                      ; index, a 1D array of indices or a 2D array of "index/number of rows" pairs.
;
;     @error:    1 = $aArray is not a 1D or 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/rows
;                3 = Mismatch between $aArray and $vIndex
;                    Indices plus number of rows in $vIndex must be smaller than number of rows in $aArray
;                5 = C++ code is not initialized
FGA_RowsClear( _
  ByRef $aArray, _ ; The 1D or 2D array to clear (blank) rows in.
  $vIndex )        ; The (row) indices in $aArray of the rows to clear.

; Delete one or more rows at the specified (row) indices in a 1D or 2D array
; FGA_RowsDelete( _
;     ByRef $aArray, _ ; The 1D or 2D array to delete rows in.
;     $vIndex )        ; The (row) indices in $aArray where the rows are to be deleted. This can be a single index, a 1D array of indi-
;                      ; ces or a 2D array of "index/number of rows" pairs. Indices must be in ascending order and cannot be duplicated.
;
;     @error:    1 = $aArray is not a 1D or 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/rows
;                3 = Mismatch between $aArray and $vIndex
;                    Indices plus number of rows in $vIndex must be smaller than number of rows in $aArray, indices
;                    must be in ascending order, and rows to delete must not overlap (a row must not be deleted twice).
;                5 = C++ code is not initialized
FGA_RowsDelete( _
  ByRef $aArray, _ ; The 1D or 2D array to delete rows in.
  $vIndex )        ; The (row) indices in $aArray where the rows are to be deleted.

; Extract one or more rows at the specified (row) indices in a 1D
; or 2D array, and return the extracted rows as a new 1D or 2D array.
; FGA_RowsExtract( _
;     ByRef $aArray, _ ; The 1D or 2D array to extract rows from.
;     $vIndex )        ; The (row) indices in $aArray of the rows to extract. This can be a single
;                      ; index, a 1D array of indices or a 2D array of "index/number of rows" pairs.
;
;     @error:    1 = $aArray is not a 1D or 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/rows
;                3 = Mismatch between $aArray and $vIndex
;                    Indices plus number of rows in $vIndex must be smaller than number of rows in $aArray
;                5 = C++ code is not initialized
FGA_RowsExtract( _
  ByRef $aArray, _ ; The 1D or 2D array to extract rows from.
  $vIndex )        ; The (row) indices in $aArray of the rows to extract.

; Insert one or more new rows at the specified (row) indices in a 1D or 2D array
; FGA_RowsInsert( _
;     ByRef $aArray, _ ; The 1D or 2D array to insert rows in.
;     $vIndex, _       ; The (row) indices in $aArray where the new rows are inserted. This can be a single index, a 1D array of in-
;                      ; dices or a 2D array of "index/number of rows" pairs. Indices must be in ascending order but can be duplicated.
;     $vRows, _        ; The new rows to insert in $aArray. This can be a single value or a 1D array of values if $aArray is a 1D array.
;                      ; Or it can be a 2D array if $aArray is a 2D array. Number of columns in $vRows MUST match the columns in $aArray.
;                      ; The rows are inserted into $aArray in the order in which they appear in $vRows and taking into account $vIndex.
;
;     @error:    1 = $aArray is not a 1D or 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/rows
;                3 = $vRows is not a valid specification of rows to insert in $aArray
;                4 = Mismatch between $aArray, $vIndex and $vRows
;                    Indices in $vIndex must be in ascending order and smaller than number of rows in $aArray
;                    Number of indices/rows in $vIndex must match number of rows in $vRows
;                5 = C++ code is not initialized
FGA_RowsInsert( _
  ByRef $aArray, _ ; The 1D or 2D array to insert rows in.
  $vIndex, _       ; The (row) indices in $aArray where the new rows are inserted.
  $vRows )         ; The new rows to insert in $aArray. This can be a single value, a 1D array or a 2D array.

  
; Functions\ColumnFuncs.au3
; ----------------------------
; Add one or more new columns after last column in an existing 2D array
; FGA_ColumnsAdd( _
;     ByRef $aArray, _ ; The 2D array to add columns to.
;     $aColumns )      ; The new columns to add to $aArray. This must be a 2D array.
;                      ; Number of rows in $aColumns MUST match the rows in $aArray.
;
;     @error:    1 = $aArray is not a 2D array
;                2 = $aColumns is not a 2D array
;                3 = Mismatch between $aArray and $aColumns
;                    Number of rows in $aColumns must match number of rows in $aArray
;                4 = VB-code is not initialized
;                5 = No valid VB class object
FGA_ColumnsAdd( _
  ByRef $aArray, _ ; The 2D array to add columns to.
  $aColumns )      ; The new columns to add to $aArray.

; Allocate more space in a 2D array by inserting one or more empty columns at the specified (column) indices
; FGA_ColumnsAllocate( _
;     ByRef $aArray, _ ; The 2D array to allocate space in.
;     $vIndex )        ; The (column) indices in $aArray where the empty columns are inserted. This can be a single index, a 1D array of in-
;                      ; dices or a 2D array of "index/number of columns" pairs. Indices must be in ascending order but can be duplicated.
;
;     @error:    1 = $aArray is not a 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/columns
;                3 = Mismatch between $aArray and $vIndex
;                    Indices in $vIndex must be in ascending order and smaller than number of columns in $aArray
;                4 = VB-code is not initialized
;                5 = No valid VB class object
FGA_ColumnsAllocate( _
  ByRef $aArray, _ ; The 2D array to allocate space in.
  $vIndex )        ; The (column) indices in $aArray where the empty columns are inserted.

; Clear (blank) one or more columns at the specified (column) indices in a 2D array
; FGA_ColumnsClear( _
;     ByRef $aArray, _ ; The 2D array to clear (blank) columns in.
;     $vIndex )        ; The (column) indices in $aArray of the columns to clear. This can be a single
;                      ; index, a 1D array of indices or a 2D array of "index/number of columns" pairs.
;
;     @error:    1 = $aArray is not a 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/columns
;                3 = Mismatch between $aArray and $vIndex
;                    Indices plus number of columns in $vIndex must be smaller than columns in $aArray
;                4 = VB-code is not initialized
;                5 = No valid VB class object
FGA_ColumnsClear( _
  ByRef $aArray, _ ; The 2D array to clear (blank) columns in.
  $vIndex )        ; The (column) indices in $aArray of the columns to clear.

; Delete one or more columns at the specified (column) indices in a 2D array
; FGA_ColumnsDelete( _
;     ByRef $aArray, _ ; The 2D array to delete columns in.
;     $vIndex )        ; The (column) indices in $aArray where the columns are to be deleted. This can be a single index, a 1D array of indi-
;                      ; ces or a 2D array of "index/number of columns" pairs. Indices must be in ascending order and cannot be duplicated.
;
;     @error:    1 = $aArray is not a 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/columns
;                3 = Mismatch between $aArray and $vIndex
;                    Indices plus number of columns in $vIndex must be smaller than number of columns in $aArray, indices
;                    must be in ascending order, and columns to delete must not overlap (a column must not be deleted twice).
;                4 = VB-code is not initialized
;                5 = No valid VB class object
FGA_ColumnsDelete( _
  ByRef $aArray, _ ; The 2D array to delete columns in.
  $vIndex )        ; The (column) indices in $aArray where the columns are to be deleted.

; Extract one or more columns at the specified (column) indices in
; a 2D array, and return the extracted columns as a new 2D array.
; FGA_ColumnsExtract( _
;     ByRef $aArray, _ ; The 2D array to extract columns from.
;     $vIndex )        ; The (column) indices in $aArray of the columns to extract. This can be a single
;                      ; index, a 1D array of indices or a 2D array of "index/number of columns" pairs.
;
;     @error:    1 = $aArray is not a 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/columns
;                3 = Mismatch between $aArray and $vIndex
;                    Indices plus number of columns in $vIndex must be smaller than number of columns in $aArray
;                4 = VB-code is not initialized
;                5 = No valid VB class object
FGA_ColumnsExtract( _
  ByRef $aArray, _ ; The 2D array to extract columns from.
  $vIndex )        ; The (column) indices in $aArray of the columns to extract.

; Insert one or more new columns at the specified (column) indices in a 2D array
; FGA_ColumnsInsert( _
;     ByRef $aArray, _ ; The 2D array to insert columns in.
;     $vIndex, _       ; The (column) indices in $aArray where the new columns are inserted. This can be a single index, a 1D array of in-
;                      ; dices or a 2D array of "index/number of columns" pairs. Indices must be in ascending order but can be duplicated.
;     $aColumns )      ; The new columns to insert in $aArray. This must be a 2D array with the same number of rows as $aArray. The columns
;                      ; are inserted into $aArray in the order in which they appear in $aColumns and taking into account $vIndex.
;
;     @error:    1 = $aArray is not a 2D array
;                2 = $vIndex is not a valid specification of $aArray indices/columns
;                3 = $aColumns is not a valid specification of columns to insert in $aArray
;                4 = Mismatch between $aArray, $vIndex and $aColumns
;                    Indices in $vIndex must be in ascending order and smaller than number of columns in $aArray
;                    Number of indices/columns in $vIndex must match number of columns in $aColumns
;                5 = VB-code is not initialized
;                6 = No valid VB class object
FGA_ColumnsInsert( _
  ByRef $aArray, _ ; The 2D array to insert columns in.
  $vIndex, _       ; The (column) indices in $aArray where the new columns are inserted.
  $aColumns )      ; The new columns to insert in $aArray. This must be a 2D array.
