diff --git a/ani/ani.h b/ani/ani.h index fa9278f31904bafdd468c94cc952a23a94a75358..e50033d199ae54468a57992d3cfc5d3626ff4da3 100644 --- a/ani/ani.h +++ b/ani/ani.h @@ -71,15 +71,6 @@ class __ani_string : public __ani_object {}; class __ani_class : public __ani_type {}; class __ani_enum : public __ani_type {}; class __ani_array : public __ani_object {}; -class __ani_array_boolean : public __ani_array {}; -class __ani_array_char : public __ani_array {}; -class __ani_array_byte : public __ani_array {}; -class __ani_array_short : public __ani_array {}; -class __ani_array_int : public __ani_array {}; -class __ani_array_long : public __ani_array {}; -class __ani_array_float : public __ani_array {}; -class __ani_array_double : public __ani_array {}; -class __ani_array_ref : public __ani_array {}; class __ani_fixedarray : public __ani_object {}; class __ani_fixedarray_boolean : public __ani_fixedarray {}; class __ani_fixedarray_char : public __ani_fixedarray {}; @@ -104,15 +95,6 @@ typedef __ani_string *ani_string; typedef __ani_class *ani_class; typedef __ani_enum *ani_enum; typedef __ani_array *ani_array; -typedef __ani_array_boolean *ani_array_boolean; -typedef __ani_array_char *ani_array_char; -typedef __ani_array_byte *ani_array_byte; -typedef __ani_array_short *ani_array_short; -typedef __ani_array_int *ani_array_int; -typedef __ani_array_long *ani_array_long; -typedef __ani_array_float *ani_array_float; -typedef __ani_array_double *ani_array_double; -typedef __ani_array_ref *ani_array_ref; typedef __ani_fixedarray *ani_fixedarray; typedef __ani_fixedarray_boolean *ani_fixedarray_boolean; typedef __ani_fixedarray_char *ani_fixedarray_char; @@ -139,15 +121,6 @@ typedef ani_object ani_string; typedef ani_type ani_class; typedef ani_type ani_enum; typedef ani_object ani_array; -typedef ani_array ani_array_boolean; -typedef ani_array ani_array_char; -typedef ani_array ani_array_byte; -typedef ani_array ani_array_short; -typedef ani_array ani_array_int; -typedef ani_array ani_array_long; -typedef ani_array ani_array_float; -typedef ani_array ani_array_double; -typedef ani_array ani_array_ref; typedef ani_object ani_fixedarray; typedef ani_fixedarray ani_fixedarray_boolean; typedef ani_fixedarray ani_fixedarray_char; @@ -961,383 +934,6 @@ struct __ani_interaction_api { */ ani_status (*Array_GetLength)(ani_env *env, ani_array array, ani_size *result); - /** - * @brief Creates a new array of booleans. - * - * This function creates a new array of the specified length for boolean values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Boolean)(ani_env *env, ani_size length, ani_array_boolean *result); - - /** - * @brief Creates a new array of characters. - * - * This function creates a new array of the specified length for character values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Char)(ani_env *env, ani_size length, ani_array_char *result); - - /** - * @brief Creates a new array of bytes. - * - * This function creates a new array of the specified length for byte values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Byte)(ani_env *env, ani_size length, ani_array_byte *result); - - /** - * @brief Creates a new array of shorts. - * - * This function creates a new array of the specified length for short integer values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Short)(ani_env *env, ani_size length, ani_array_short *result); - - /** - * @brief Creates a new array of integers. - * - * This function creates a new array of the specified length for integer values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Int)(ani_env *env, ani_size length, ani_array_int *result); - - /** - * @brief Creates a new array of long integers. - * - * This function creates a new array of the specified length for long integer values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Long)(ani_env *env, ani_size length, ani_array_long *result); - - /** - * @brief Creates a new array of floats. - * - * This function creates a new array of the specified length for float values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Float)(ani_env *env, ani_size length, ani_array_float *result); - - /** - * @brief Creates a new array of doubles. - * - * This function creates a new array of the specified length for double values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Double)(ani_env *env, ani_size length, ani_array_double *result); - - /** - * @brief Retrieves a region of boolean values from an array. - * - * This function retrieves a portion of the specified boolean array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved boolean values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, - ani_boolean *native_buffer); - - /** - * @brief Retrieves a region of character values from an array. - * - * This function retrieves a portion of the specified character array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved character values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, - ani_char *native_buffer); - - /** - * @brief Retrieves a region of byte values from an array. - * - * This function retrieves a portion of the specified byte array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved byte values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, - ani_byte *native_buffer); - - /** - * @brief Retrieves a region of short values from an array. - * - * This function retrieves a portion of the specified short array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved short values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, - ani_short *native_buffer); - - /** - * @brief Retrieves a region of integer values from an array. - * - * This function retrieves a portion of the specified integer array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved integer values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, - ani_int *native_buffer); - - /** - * @brief Retrieves a region of long integer values from an array. - * - * This function retrieves a portion of the specified long integer array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved long integer values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, - ani_long *native_buffer); - - /** - * @brief Retrieves a region of float values from an array. - * - * This function retrieves a portion of the specified float array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved float values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, - ani_float *native_buffer); - - /** - * @brief Retrieves a region of double values from an array. - * - * This function retrieves a portion of the specified double array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved double values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, - ani_double *native_buffer); - - /** - * @brief Sets a region of boolean values in an array. - * - * This function sets a portion of the specified boolean array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the boolean values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, - const ani_boolean *native_buffer); - - /** - * @brief Sets a region of character values in an array. - * - * This function sets a portion of the specified character array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the character values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, - const ani_char *native_buffer); - - /** - * @brief Sets a region of byte values in an array. - * - * This function sets a portion of the specified byte array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the byte values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, - const ani_byte *native_buffer); - - /** - * @brief Sets a region of short values in an array. - * - * This function sets a portion of the specified short array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the short values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, - const ani_short *native_buffer); - - /** - * @brief Sets a region of integer values in an array. - * - * This function sets a portion of the specified integer array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the integer values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, - const ani_int *native_buffer); - - /** - * @brief Sets a region of long integer values in an array. - * - * This function sets a portion of the specified long integer array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the long integer values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, - const ani_long *native_buffer); - - /** - * @brief Sets a region of float values in an array. - * - * This function sets a portion of the specified float array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the float values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, - const ani_float *native_buffer); - - /** - * @brief Sets a region of double values in an array. - * - * This function sets a portion of the specified double array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the double values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, - const ani_double *native_buffer); - - /** - * @brief Creates a new array of references. - * - * This function creates a new array of references, optionally initializing it with an array of references. - * - * @param[in] env A pointer to the environment structure. - * @param[in] type The type of the elements of the array. - * @param[in] length The length of the array to be created. - * @param[in] initial_element An optional reference to initialize the array. Can be null. - * @param[out] result A pointer to store the created array of references. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Ref)(ani_env *env, ani_type type, ani_size length, ani_ref initial_element, - ani_array_ref *result); - - /** - * @brief Sets a reference at a specific index in an array. - * - * This function sets the value of a reference at the specified index in the array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array of references to modify. - * @param[in] index The index at which to set the reference. - * @param[in] ref The reference to set at the specified index. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_Set_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref ref); - - /** - * @brief Retrieves a reference from a specific index in an array. - * - * This function retrieves the value of a reference at the specified index in the array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array of references to query. - * @param[in] index The index from which to retrieve the reference. - * @param[out] result A pointer to store the retrieved reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_Get_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref *result); - /** * @brief Creates a new array * @@ -6486,123 +6082,6 @@ struct __ani_env { { return c_api->Array_GetLength(this, array, result); } - ani_status Array_New_Boolean(ani_size length, ani_array_boolean *result) - { - return c_api->Array_New_Boolean(this, length, result); - } - ani_status Array_New_Char(ani_size length, ani_array_char *result) - { - return c_api->Array_New_Char(this, length, result); - } - ani_status Array_New_Byte(ani_size length, ani_array_byte *result) - { - return c_api->Array_New_Byte(this, length, result); - } - ani_status Array_New_Short(ani_size length, ani_array_short *result) - { - return c_api->Array_New_Short(this, length, result); - } - ani_status Array_New_Int(ani_size length, ani_array_int *result) - { - return c_api->Array_New_Int(this, length, result); - } - ani_status Array_New_Long(ani_size length, ani_array_long *result) - { - return c_api->Array_New_Long(this, length, result); - } - ani_status Array_New_Float(ani_size length, ani_array_float *result) - { - return c_api->Array_New_Float(this, length, result); - } - ani_status Array_New_Double(ani_size length, ani_array_double *result) - { - return c_api->Array_New_Double(this, length, result); - } - ani_status Array_GetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, - ani_boolean *native_buffer) - { - return c_api->Array_GetRegion_Boolean(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Char(ani_array_char array, ani_size offset, ani_size length, ani_char *native_buffer) - { - return c_api->Array_GetRegion_Char(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, ani_byte *native_buffer) - { - return c_api->Array_GetRegion_Byte(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Short(ani_array_short array, ani_size offset, ani_size length, ani_short *native_buffer) - { - return c_api->Array_GetRegion_Short(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Int(ani_array_int array, ani_size offset, ani_size length, ani_int *native_buffer) - { - return c_api->Array_GetRegion_Int(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Long(ani_array_long array, ani_size offset, ani_size length, ani_long *native_buffer) - { - return c_api->Array_GetRegion_Long(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Float(ani_array_float array, ani_size offset, ani_size length, ani_float *native_buffer) - { - return c_api->Array_GetRegion_Float(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Double(ani_array_double array, ani_size offset, ani_size length, - ani_double *native_buffer) - { - return c_api->Array_GetRegion_Double(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, - const ani_boolean *native_buffer) - { - return c_api->Array_SetRegion_Boolean(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Char(ani_array_char array, ani_size offset, ani_size length, - const ani_char *native_buffer) - { - return c_api->Array_SetRegion_Char(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, - const ani_byte *native_buffer) - { - return c_api->Array_SetRegion_Byte(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Short(ani_array_short array, ani_size offset, ani_size length, - const ani_short *native_buffer) - { - return c_api->Array_SetRegion_Short(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Int(ani_array_int array, ani_size offset, ani_size length, const ani_int *native_buffer) - { - return c_api->Array_SetRegion_Int(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Long(ani_array_long array, ani_size offset, ani_size length, - const ani_long *native_buffer) - { - return c_api->Array_SetRegion_Long(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Float(ani_array_float array, ani_size offset, ani_size length, - const ani_float *native_buffer) - { - return c_api->Array_SetRegion_Float(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Double(ani_array_double array, ani_size offset, ani_size length, - const ani_double *native_buffer) - { - return c_api->Array_SetRegion_Double(this, array, offset, length, native_buffer); - } - ani_status Array_New_Ref(ani_type type, ani_size length, ani_ref initial_element, ani_array_ref *result) - { - return c_api->Array_New_Ref(this, type, length, initial_element, result); - } - ani_status Array_Set_Ref(ani_array_ref array, ani_size index, ani_ref ref) - { - return c_api->Array_Set_Ref(this, array, index, ref); - } - ani_status Array_Get_Ref(ani_array_ref array, ani_size index, ani_ref *result) - { - return c_api->Array_Get_Ref(this, array, index, result); - } ani_status Array_New(ani_size length, ani_ref initial_element, ani_array *result) { return c_api->Array_New(this, length, initial_element, result);