libroadrunner C API
|
Some methods return lists (heterogeneous arrays of data), these routines make it easier to manipulate lists. More...
Functions | |
C_DECL_SPEC RRListPtr rrcCallConv | createRRList (void) |
Create a new list. More... | |
C_DECL_SPEC void rrcCallConv | freeRRList (RRListPtr list) |
Free RRListPtr structure, i.e destroy a list. | |
C_DECL_SPEC int rrcCallConv | getListLength (RRListPtr myList) |
Returns the length of a given list. More... | |
C_DECL_SPEC RRListItemPtr rrcCallConv | createIntegerItem (int value) |
Create a list item to store an integer. More... | |
C_DECL_SPEC RRListItemPtr rrcCallConv | createDoubleItem (double value) |
Create a list item to store a double value. More... | |
C_DECL_SPEC RRListItemPtr rrcCallConv | createStringItem (char *value) |
Create a list item to store a pointer to a char*. More... | |
C_DECL_SPEC RRListItemPtr rrcCallConv | createListItem (struct RRList *value) |
Create a list item to store a list. More... | |
C_DECL_SPEC int rrcCallConv | addItem (RRListPtr list, RRListItemPtr *item) |
Add a list item to a list and return index to the added item. More... | |
C_DECL_SPEC RRListItemPtr rrcCallConv | getListItem (RRListPtr list, int index) |
Returns the index^th item from the list. More... | |
C_DECL_SPEC int rrcCallConv | isListItemInteger (RRListItemPtr item) |
Returns true or false if the list item is an integer. More... | |
C_DECL_SPEC int rrcCallConv | isListItemDouble (RRListItemPtr item) |
Returns true or false if the list item is a double. More... | |
C_DECL_SPEC int rrcCallConv | isListItemString (RRListItemPtr item) |
Returns true or false if the list item is a character array. More... | |
C_DECL_SPEC int rrcCallConv | isListItemList (RRListItemPtr item) |
Returns true or false if the list item is a list itself. More... | |
C_DECL_SPEC int rrcCallConv | isListItem (RRListItemPtr item, enum ListItemType itemType) |
Returns true or false if the list item is the given itemType. More... | |
C_DECL_SPEC int rrcCallConv | getIntegerListItem (RRListItemPtr item, int *value) |
Returns the integer from a list item. More... | |
C_DECL_SPEC int rrcCallConv | getDoubleListItem (RRListItemPtr item, double *value) |
Returns the double from a list item. More... | |
C_DECL_SPEC char *rrcCallConv | getStringListItem (RRListItemPtr item) |
Returns the string from a list item. More... | |
C_DECL_SPEC RRListPtr rrcCallConv | getList (RRListItemPtr item) |
Returns a list from a list item if it contains a list. More... | |
Some methods return lists (heterogeneous arrays of data), these routines make it easier to manipulate lists.
C_DECL_SPEC int rrcCallConv addItem | ( | RRListPtr | list, |
RRListItemPtr * | item | ||
) |
Add a list item to a list and return index to the added item.
[in] | list | The list to store the item in |
[in] | item | The list item to store in the list |
C_DECL_SPEC RRListItemPtr rrcCallConv createDoubleItem | ( | double | value | ) |
Create a list item to store a double value.
[in] | value | The double to store in the list item |
C_DECL_SPEC RRListItemPtr rrcCallConv createIntegerItem | ( | int | value | ) |
Create a list item to store an integer.
[in] | value | The integer to store in the list item |
C_DECL_SPEC RRListItemPtr rrcCallConv createListItem | ( | struct RRList * | value | ) |
Create a list item to store a list.
[in] | value | The list to store in the list item |
C_DECL_SPEC RRListPtr rrcCallConv createRRList | ( | void | ) |
Create a new list.
A list is a container for storing list items. List items can represent integers, double, strings and lists. To populate a list, create list items of the appropriate type and add them to the list
Example, build the list [123, [3.1415926]]
C_DECL_SPEC RRListItemPtr rrcCallConv createStringItem | ( | char * | value | ) |
Create a list item to store a pointer to a char*.
[in] | value | The string to store in the list item |
C_DECL_SPEC int rrcCallConv getDoubleListItem | ( | RRListItemPtr | item, |
double * | value | ||
) |
Returns the double from a list item.
[in] | item | The list item to work with |
[out] | value | The double value returned by the method |
C_DECL_SPEC int rrcCallConv getIntegerListItem | ( | RRListItemPtr | item, |
int * | value | ||
) |
Returns the integer from a list item.
[in] | item | The list item to work with |
[out] | value | The integer value returned by the method |
C_DECL_SPEC RRListPtr rrcCallConv getList | ( | RRListItemPtr | item | ) |
Returns a list from a list item if it contains a list.
[in] | item | The list item to retrieve the list type from |
C_DECL_SPEC RRListItemPtr rrcCallConv getListItem | ( | RRListPtr | list, |
int | index | ||
) |
Returns the index^th item from the list.
[in] | list | The list to retrieve the list item from |
[in] | index | The index list item we are interested in |
C_DECL_SPEC int rrcCallConv getListLength | ( | RRListPtr | myList | ) |
Returns the length of a given list.
[in] | myList | The list to retrieve the length from |
C_DECL_SPEC char* rrcCallConv getStringListItem | ( | RRListItemPtr | item | ) |
Returns the string from a list item.
[in] | item | The list item to work with |
C_DECL_SPEC int rrcCallConv isListItem | ( | RRListItemPtr | item, |
enum ListItemType | itemType | ||
) |
Returns true or false if the list item is the given itemType.
[in] | item | The list |
[in] | itemType | The list item type to check for |
C_DECL_SPEC int rrcCallConv isListItemDouble | ( | RRListItemPtr | item | ) |
Returns true or false if the list item is a double.
[in] | item | The list |
C_DECL_SPEC int rrcCallConv isListItemInteger | ( | RRListItemPtr | item | ) |
Returns true or false if the list item is an integer.
[in] | item | The list |
C_DECL_SPEC int rrcCallConv isListItemList | ( | RRListItemPtr | item | ) |
Returns true or false if the list item is a list itself.
[in] | item | The list |
C_DECL_SPEC int rrcCallConv isListItemString | ( | RRListItemPtr | item | ) |
Returns true or false if the list item is a character array.
[in] | item | The list |