Max 5 API Reference
|
Functions | |
| void * | jit_linklist_new (void) |
| Constructs instance of t_jit_linklist. | |
| long | jit_linklist_getsize (t_jit_linklist *x) |
| Retrieves the linked list size. | |
| void * | jit_linklist_getindex (t_jit_linklist *x, long index) |
| Retrieves the object at the specified list index. | |
| long | jit_linklist_objptr2index (t_jit_linklist *x, void *p) |
| Retrieves the list index for an object pointer. | |
| long | jit_linklist_makearray (t_jit_linklist *x, void **a, long max) |
| Flatten the linked list into an array. | |
| long | jit_linklist_insertindex (t_jit_linklist *x, void *o, long index) |
| Insert object at specified index. | |
| long | jit_linklist_append (t_jit_linklist *x, void *o) |
| Append object to the end of the linked list. | |
| long | jit_linklist_deleteindex (t_jit_linklist *x, long index) |
| Delete object at specified index, freeing the object. | |
| long | jit_linklist_chuckindex (t_jit_linklist *x, long index) |
| Remove object at specified index, without freeing the object. | |
| void | jit_linklist_clear (t_jit_linklist *x) |
| Clears the linked list, freeing all objects in list. | |
| void | jit_linklist_chuck (t_jit_linklist *x) |
| Removes all objects from the linked list, without freeing any objects in list. | |
| void | jit_linklist_reverse (t_jit_linklist *x) |
| Reverses the order of objects in the linked list. | |
| void | jit_linklist_rotate (t_jit_linklist *x, long i) |
| Rotates the order of objects in the linked list, by the specified number of indeces. | |
| void | jit_linklist_shuffle (t_jit_linklist *x) |
| Randomizes the order of objects in the linked list. | |
| void | jit_linklist_swap (t_jit_linklist *x, long a, long b) |
| Swap list location of the indeces specified. | |
| void | jit_linklist_findfirst (t_jit_linklist *x, void **o, long cmpfn(void *, void *), void *cmpdata) |
| Retrieves the first object that satisfies the comparison function. | |
| void | jit_linklist_findall (t_jit_linklist *x, t_jit_linklist **out, long cmpfn(void *, void *), void *cmpdata) |
| Retrieves a linked list of all objects that satisfy the comparison function. | |
| long | jit_linklist_findcount (t_jit_linklist *x, long cmpfn(void *, void *), void *cmpdata) |
| Retrieves the number of objects that satisfy the comparison function. | |
| void | jit_linklist_methodall (t_jit_linklist *x, t_symbol *s,...) |
| Calls a method on all objects in linked list. | |
| void * | jit_linklist_methodindex (t_jit_linklist *x, long i, t_symbol *s,...) |
| Calls a method on the object at the specified index. | |
| void | jit_linklist_sort (t_jit_linklist *x, long cmpfn(void *, void *)) |
| Sorts linked list based on the provided comparison function. | |
| long jit_linklist_append | ( | t_jit_linklist * | x, | |
| void * | o | |||
| ) |
Append object to the end of the linked list.
| x | t_jit_linklist object pointer | |
| o | object pointer |
Definition at line 508 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().
Referenced by jit_linklist_findall(), jit_linklist_sort(), jit_matrix_op(), max_jit_classex_addattr(), and max_jit_obex_proxy_new().

| void jit_linklist_chuck | ( | t_jit_linklist * | x | ) |
Removes all objects from the linked list, without freeing any objects in list.
To remove all objects from the linked list, reeing the objects, use the jit_linklist_clear method.
| x | t_jit_linklist object pointer |
Definition at line 827 of file jit.linklist.c.
References jit_global_critical_enter(), jit_global_critical_exit(), and jit_object_free().
Referenced by jit_linklist_sort(), jit_matrix_op(), and jit_object_importattrs().

| long jit_linklist_chuckindex | ( | t_jit_linklist * | x, | |
| long | index | |||
| ) |
Remove object at specified index, without freeing the object.
This method will not free the object. To remove from the linked list and free the object, use the jit_linklist_deleteindex method.
| x | t_jit_linklist object pointer | |
| index | index to remove (zero based) |
Definition at line 722 of file jit.linklist.c.
References freebytes(), jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_clear | ( | t_jit_linklist * | x | ) |
Clears the linked list, freeing all objects in list.
To remove all elements from the linked list without freeing the objects, use the jit_linklist_chuck method.
| x | t_jit_linklist object pointer |
Definition at line 787 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().
Referenced by jit_linklist_free().

| long jit_linklist_deleteindex | ( | t_jit_linklist * | x, | |
| long | index | |||
| ) |
Delete object at specified index, freeing the object.
To remove from the linked list without freeing the object, use the jit_linklist_chuckindex method.
| x | t_jit_linklist object pointer | |
| index | index to delete (zero based) |
Definition at line 588 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_findall | ( | t_jit_linklist * | x, | |
| t_jit_linklist ** | out, | |||
| long | cmpfnvoid *, void *, | |||
| void * | cmpdata | |||
| ) |
Retrieves a linked list of all objects that satisfy the comparison function.
| x | t_jit_linklist object pointer | |
| out | pointer to linked list containing all objects found found (set to NULL, if not found) | |
| cmpfn | comparison function pointer (should returns 1 if object matches data, otherwise 0) | |
| cmpdata | opaque data used in comparison function |
Definition at line 1077 of file jit.linklist.c.
References jit_global_critical_enter(), jit_global_critical_exit(), jit_linklist_append(), and jit_linklist_new().

| long jit_linklist_findcount | ( | t_jit_linklist * | x, | |
| long | cmpfnvoid *, void *, | |||
| void * | cmpdata | |||
| ) |
Retrieves the number of objects that satisfy the comparison function.
| x | t_jit_linklist object pointer | |
| cmpfn | comparison function pointer (should returns 1 if object matches data, otherwise 0) | |
| cmpdata | opaque data used in comparison function |
Definition at line 1117 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_findfirst | ( | t_jit_linklist * | x, | |
| void ** | o, | |||
| long | cmpfnvoid *, void *, | |||
| void * | cmpdata | |||
| ) |
Retrieves the first object that satisfies the comparison function.
| x | t_jit_linklist object pointer | |
| o | pointer to object pointer found (set to NULL, if not found) | |
| cmpfn | comparison function pointer (should returns 1 if object matches data, otherwise 0) | |
| cmpdata | opaque data used in comparison function |
Definition at line 1037 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().
Referenced by max_jit_obex_attr_get(), and max_jit_obex_attr_set().

| void* jit_linklist_getindex | ( | t_jit_linklist * | x, | |
| long | index | |||
| ) |
Retrieves the object at the specified list index.
| x | t_jit_linklist object pointer | |
| index | list index () |
Definition at line 162 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().
Referenced by jit_linklist_methodindex(), and jit_object_importattrs().

| long jit_linklist_getsize | ( | t_jit_linklist * | x | ) |
Retrieves the linked list size.
| x | t_jit_linklist object pointer |
Definition at line 133 of file jit.linklist.c.
Referenced by jit_object_importattrs().
| long jit_linklist_insertindex | ( | t_jit_linklist * | x, | |
| void * | o, | |||
| long | index | |||
| ) |
Insert object at specified index.
| x | t_jit_linklist object pointer | |
| o | object pointer | |
| index | index (zero based) |
Definition at line 345 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| long jit_linklist_makearray | ( | t_jit_linklist * | x, | |
| void ** | a, | |||
| long | max | |||
| ) |
Flatten the linked list into an array.
| x | t_jit_linklist object pointer | |
| a | array pointer | |
| max | maximum array size |
Definition at line 302 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_methodall | ( | t_jit_linklist * | x, | |
| t_symbol * | s, | |||
| ... | ||||
| ) |
Calls a method on all objects in linked list.
Equivalent to calling jit_object_method on the object at each index.
| x | t_jit_linklist object pointer | |
| s | method name | |
| ... | untyped arguments |
Definition at line 1156 of file jit.linklist.c.
References jit_global_critical_enter(), jit_global_critical_exit(), and jit_object_method().

| void* jit_linklist_methodindex | ( | t_jit_linklist * | x, | |
| long | i, | |||
| t_symbol * | s, | |||
| ... | ||||
| ) |
Calls a method on the object at the specified index.
Equivalent to calling jit_object_method on the object.
| x | t_jit_linklist object pointer | |
| i | index | |
| s | method name | |
| ... | untyped arguments |
Definition at line 1195 of file jit.linklist.c.
References jit_linklist_getindex(), and jit_object_method().

| void* jit_linklist_new | ( | void | ) |
Constructs instance of t_jit_linklist.
Definition at line 81 of file jit.linklist.c.
Referenced by jit_linklist_findall(), jit_linklist_sort(), jit_matrix_op(), jit_qt_movie_new(), max_jit_classex_addattr(), and max_jit_obex_proxy_new().
| long jit_linklist_objptr2index | ( | t_jit_linklist * | x, | |
| void * | p | |||
| ) |
Retrieves the list index for an object pointer.
| x | t_jit_linklist object pointer | |
| p | object pointer |
Definition at line 254 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_reverse | ( | t_jit_linklist * | x | ) |
Reverses the order of objects in the linked list.
| x | t_jit_linklist object pointer |
Definition at line 862 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_rotate | ( | t_jit_linklist * | x, | |
| long | i | |||
| ) |
Rotates the order of objects in the linked list, by the specified number of indeces.
| x | t_jit_linklist object pointer | |
| i | rotation index count |
Definition at line 903 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().

| void jit_linklist_shuffle | ( | t_jit_linklist * | x | ) |
Randomizes the order of objects in the linked list.
| x | t_jit_linklist object pointer |
Definition at line 952 of file jit.linklist.c.
References jit_global_critical_enter(), jit_global_critical_exit(), and jit_rand().

| void jit_linklist_sort | ( | t_jit_linklist * | x, | |
| long | cmpfnvoid *, void * | |||
| ) |
Sorts linked list based on the provided comparison function.
| x | t_jit_linklist object pointer | |
| cmpfn | comparison function pointer (returns 0 if a>b, otherwise 1) |
Definition at line 1226 of file jit.linklist.c.
References jit_global_critical_enter(), jit_global_critical_exit(), jit_linklist_append(), jit_linklist_chuck(), and jit_linklist_new().

| void jit_linklist_swap | ( | t_jit_linklist * | x, | |
| long | a, | |||
| long | b | |||
| ) |
Swap list location of the indeces specified.
| x | t_jit_linklist object pointer | |
| a | index a | |
| b | index b |
Definition at line 996 of file jit.linklist.c.
References jit_global_critical_enter(), and jit_global_critical_exit().
