|
dxFeed Graal Native SDK 3.15.0
|
The macros and the functions that every header of the C API uses: the marker of an output parameter, the deprecation marker, the status results and the functions that free memory allocated by the SDK. More...
Data Structures | |
| struct | dxfg_string_to_double_map_entry_t |
| A map entry that consists of a string and a double: an element of an array that represents a map from strings to doubles. More... | |
Macros | |
| #define | DXFG_OUT |
| #define | DXFG_EXECUTE_SUCCESSFULLY ((int32_t)0) |
| #define | DXFG_EXECUTE_FAIL ((int32_t)-1) |
Typedefs | |
| typedef struct dxfg_string_to_double_map_entry_t | dxfg_string_to_double_map_entry_t |
| A map entry that consists of a string and a double: an element of an array that represents a map from strings to doubles. | |
Functions | |
| int32_t | dxfg_free_string_to_double_map_entries (graal_isolatethread_t *thread, dxfg_string_to_double_map_entry_t *mapEntries, int32_t size) |
| Frees an array of string to double map entries that a function of the SDK returned. | |
| int32_t | dxfg_free (graal_isolatethread_t *thread, void *pointer) |
| Frees a block of the unmanaged (GraalVM) memory that a function of the SDK allocated, e.g. the array of doubles that dxfg_PriceIncrements_getPriceIncrements() returns. | |
| int32_t | dxfg_free_strings (graal_isolatethread_t *thread, char **strings, int32_t size) |
| Frees an array of C strings that a function of the SDK returned. | |
The macros and the functions that every header of the C API uses: the marker of an output parameter, the deprecation marker, the status results and the functions that free memory allocated by the SDK.
The ownership rules of the handles, the strings and the lists are described in the group Javac.
| #define DXFG_EXECUTE_FAIL ((int32_t)-1) |
A result that signals an error that any dxFeed Graal Native SDK function can return: a function that returns int32_t status returns DXFG_EXECUTE_FAIL (-1) when it was terminated by an exception. For information about the thrown exception, see the dxfg_get_and_clear_thread_exception_t() function. Other functions signal an error with another value, which is given in the @return of the function.
| #define DXFG_EXECUTE_SUCCESSFULLY ((int32_t)0) |
Marks a deprecated function: the compilers warn where it is used. The function still works, see its description for the replacement. Marks an experimental function: it may change or be removed in a minor release (see the tiers in The v4 functions), and its description says so. The macro expands to nothing, unless the application defines it before the headers are included, e.g. #define DXFG_EXPERIMENTAL [[deprecated("experimental")]] in C++ or -D'DXFG_EXPERIMENTAL=__attribute__((deprecated("experimental")))' with GCC and Clang, so that the compilers warn where the experimental functions are used. A successful result that any dxFeed Graal Native SDK function can return: the status of the functions that return int32_t status, DXFG_EXECUTE_SUCCESSFULLY (0) means that the function was executed without an exception.
| #define DXFG_OUT |
Marks an output parameter of a function: a pointer to a variable that the function writes the result to, e.g. DXFG_OUT dxfg_endpoint_t **endpoint. The caller passes the address of its own variable, and the variable is written only if the function succeeds (returns DXFG_EXECUTE_SUCCESSFULLY). The macro expands to nothing: it only documents the direction of the parameter in the declaration (the [out] of the documentation).
| typedef struct dxfg_string_to_double_map_entry_t dxfg_string_to_double_map_entry_t |
A map entry that consists of a string and a double: an element of an array that represents a map from strings to doubles.
An array that a function returns (e.g. dxfg_AdditionalUnderlyings_getMap()) is allocated by the SDK together with the strings of the keys: release it with dxfg_free_string_to_double_map_entries(). An array that is passed to a function (e.g. dxfg_AdditionalUnderlyings_valueOf2()) is only read by the SDK: the caller keeps its ownership.
| int32_t dxfg_free | ( | graal_isolatethread_t * | thread, |
| void * | pointer ) |
Frees a block of the unmanaged (GraalVM) memory that a function of the SDK allocated, e.g. the array of doubles that dxfg_PriceIncrements_getPriceIncrements() returns.
Only a block of memory that a function of the SDK allocated and documents to be released with this function can be passed. Do not use the memory after that.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | pointer | The pointer to the unmanaged memory that was returned by the SDK. |
| int32_t dxfg_free_string_to_double_map_entries | ( | graal_isolatethread_t * | thread, |
| dxfg_string_to_double_map_entry_t * | mapEntries, | ||
| int32_t | size ) |
Frees an array of string to double map entries that a function of the SDK returned.
It frees the key of every entry and the array itself. Do not use the array and the keys after that. If the array is NULL or size is not positive, the function does nothing (an empty array is not freed) and returns DXFG_EXECUTE_SUCCESSFULLY.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | mapEntries | The array of map entries ([string, double] pair) that was returned by the SDK. |
| [in] | size | The number of entries in the array, as returned together with the array. |
| int32_t dxfg_free_strings | ( | graal_isolatethread_t * | thread, |
| char ** | strings, | ||
| int32_t | size ) |
Frees an array of C strings that a function of the SDK returned.
It frees every string and the array itself. Do not use the array and the strings after that. If the array is NULL or size is not positive, the function does nothing (an empty array is not freed) and returns DXFG_EXECUTE_SUCCESSFULLY. A list of strings (dxfg_string_list) is not an array of this kind: it is released with dxfg_CList_String_release().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | strings | The array of the NUL-terminated strings that was returned by the SDK. |
| [in] | size | The number of strings in the array, as returned together with the array. |