![]() |
as_list is an interface for List based data types.
Implementations:
Definition at line 64 of file modules/common/src/include/aerospike/as_list.h.
#include "as_list.h"
Data Fields | |
void * | data |
struct as_list_hooks_s * | hooks |
![]() | |
cf_atomic32 | count |
bool | free |
enum as_val_t | type |
Private Attributes | |
as_val | _ |
Related Functions | |
(Note that these are not member functions.) | |
static int | as_list_append (as_list *list, as_val *value) |
static int | as_list_append_bytes (as_list *list, as_bytes *value) |
static int | as_list_append_int64 (as_list *list, int64_t value) |
static int | as_list_append_integer (as_list *list, as_integer *value) |
static int | as_list_append_list (as_list *list, as_list *value) |
static int | as_list_append_map (as_list *list, struct as_map_s *value) |
static int | as_list_append_str (as_list *list, const char *value) |
static int | as_list_append_string (as_list *list, as_string *value) |
as_list * | as_list_cons (as_list *list, bool free, void *data, const as_list_hooks *hooks) |
static void | as_list_destroy (as_list *list) |
static as_list * | as_list_drop (const as_list *list, uint32_t n) |
static bool | as_list_foreach (const as_list *list, as_list_foreach_callback callback, void *udata) |
static as_list * | as_list_fromval (as_val *v) |
static as_val * | as_list_get (const as_list *list, const uint32_t i) |
static as_bytes * | as_list_get_bytes (const as_list *list, const uint32_t i) |
static int64_t | as_list_get_int64 (const as_list *list, const uint32_t i) |
static as_integer * | as_list_get_integer (const as_list *list, const uint32_t i) |
static as_list * | as_list_get_list (const as_list *list, const uint32_t i) |
static struct as_map_s * | as_list_get_map (const as_list *list, const uint32_t i) |
static char * | as_list_get_str (const as_list *list, const uint32_t i) |
static as_string * | as_list_get_string (const as_list *list, const uint32_t i) |
static uint32_t | as_list_hashcode (as_list *list) |
static as_val * | as_list_head (const as_list *list) |
as_list * | as_list_init (as_list *list, void *data, const as_list_hooks *hooks) |
static union as_list_iterator_u * | as_list_iterator_init (union as_list_iterator_u *it, const as_list *list) |
static union as_list_iterator_u * | as_list_iterator_new (const as_list *list) |
as_list * | as_list_new (void *data, const as_list_hooks *hooks) |
static int | as_list_prepend (as_list *list, as_val *value) |
static int | as_list_prepend_bytes (as_list *list, as_bytes *value) |
static int | as_list_prepend_int64 (as_list *list, int64_t value) |
static int | as_list_prepend_integer (as_list *list, as_integer *value) |
static int | as_list_prepend_list (as_list *list, as_list *value) |
static int | as_list_prepend_map (as_list *list, struct as_map_s *value) |
static int | as_list_prepend_str (as_list *list, const char *value) |
static int | as_list_prepend_string (as_list *list, as_string *value) |
static int | as_list_set (as_list *list, const uint32_t i, as_val *value) |
static int | as_list_set_bytes (as_list *list, const uint32_t i, as_bytes *value) |
static int | as_list_set_int64 (as_list *list, const uint32_t i, int64_t value) |
static int | as_list_set_integer (as_list *list, const uint32_t i, as_integer *value) |
static int | as_list_set_list (as_list *list, const uint32_t i, as_list *value) |
static int | as_list_set_map (as_list *list, const uint32_t i, struct as_map_s *value) |
static int | as_list_set_str (as_list *list, const uint32_t i, const char *value) |
static int | as_list_set_string (as_list *list, const uint32_t i, as_string *value) |
static uint32_t | as_list_size (as_list *list) |
static as_list * | as_list_tail (const as_list *list) |
static as_list * | as_list_take (const as_list *list, uint32_t n) |
static as_val * | as_list_toval (as_list *list) |
Append a value to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 738 of file modules/common/src/include/aerospike/as_list.h.
Append an as_bytes to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 808 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Append an int64_t to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 752 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Append an as_integer to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 780 of file modules/common/src/include/aerospike/as_list.h.
Append an as_list to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 822 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Append an as_map to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 836 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Append a NULL-terminated string to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 766 of file modules/common/src/include/aerospike/as_list.h.
Append an as_string to the list.
list | The list. |
value | The value to append to the list. |
Definition at line 794 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Utilized by subtypes of as_list to initialize the parent.
list | The list to initialize. |
free | If true, then as_list_destroy() will free the list. |
data | Data for the list. |
hooks | Implementaton for the list interface. |
|
related |
Destroy the list and associated resources.
list | The list to destroy. |
Definition at line 389 of file modules/common/src/include/aerospike/as_list.h.
Create a new list containing all elements, except the first n elements, of the list.
list | The list to drop elements from. |
n | The number of elements to drop. |
Definition at line 463 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Call the callback function for each element in the list..
list | The list to iterate over. |
callback | The callback function call for each element. |
udata | User-data to send to the callback. |
Definition at line 972 of file modules/common/src/include/aerospike/as_list.h.
Convert from an as_val.
Definition at line 1022 of file modules/common/src/include/aerospike/as_list.h.
Get the value at specified index as an as_val.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 495 of file modules/common/src/include/aerospike/as_list.h.
Get the value at specified index as an as_val.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 565 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Get the value at specified index as an int64_t.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 509 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Get the value at specified index as an as_integer.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 537 of file modules/common/src/include/aerospike/as_list.h.
Get the value at specified index as an as_val.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 579 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Get the value at specified index as an as_val.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 594 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Get the value at specified index as an NULL terminated string.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 523 of file modules/common/src/include/aerospike/as_list.h.
Get the value at specified index as an as_val.
list | The list to get the value from. |
i | The index of the value to get from the list. |
Definition at line 551 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Get the hashcode value for the list.
list | The list. |
Definition at line 406 of file modules/common/src/include/aerospike/as_list.h.
The first element in the list.
list | The list to get the head value from. |
Definition at line 436 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Initialize a stack allocated list.
list | Stack allocated list to initialize. |
data | Data for the list. |
hooks | Implementaton for the list interface. |
|
related |
Initializes a stack allocated iterator over the given list.
list | The list to iterate. |
it | The iterator to initialize. |
Definition at line 1000 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Creates and initializes a new heap allocated iterator over the given list.
list | The list to iterate. |
Definition at line 985 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Create and initialize a new heap allocated list.
data | Data for the list. |
hooks | Implementaton for the list interface. |
Prepend a value to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 854 of file modules/common/src/include/aerospike/as_list.h.
Prepend an as_bytes to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 924 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Prepend an int64_t value to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 868 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Prepend an as_integer to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 896 of file modules/common/src/include/aerospike/as_list.h.
Prepend an as_list to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 938 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Prepend an as_map to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 952 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Prepend a NULL-terminated string to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 882 of file modules/common/src/include/aerospike/as_list.h.
Prepend an as_string to the list.
list | The list. |
value | The value to prepend to the list. |
Definition at line 910 of file modules/common/src/include/aerospike/as_list.h.
Set the value at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 615 of file modules/common/src/include/aerospike/as_list.h.
Set an as_bytes at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 690 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Set an int64_t at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 630 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Set an as_integer at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 660 of file modules/common/src/include/aerospike/as_list.h.
Set an as_list at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 705 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Set an as_map at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 720 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Set a NULL-terminated string at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 645 of file modules/common/src/include/aerospike/as_list.h.
Set an as_string at specified index as an as_val.
list | The list. |
i | The index of the value to set in the list. |
value | The value to set at the given index. |
Definition at line 675 of file modules/common/src/include/aerospike/as_list.h.
|
related |
Number of elements in the list.
list | The list. |
Definition at line 419 of file modules/common/src/include/aerospike/as_list.h.
All elements after the first element in the list.
list | The list to get the tail from. |
Definition at line 449 of file modules/common/src/include/aerospike/as_list.h.
Creates a new list containing the first n elements of the list.
list | The list to drop elements from. |
n | The number of elements to take. |
Definition at line 477 of file modules/common/src/include/aerospike/as_list.h.
Convert to an as_val.
Definition at line 1013 of file modules/common/src/include/aerospike/as_list.h.
|
private |
void * as_list::data |
Pointer to the data for this list.
Definition at line 76 of file modules/common/src/include/aerospike/as_list.h.
struct as_list_hooks_s * as_list::hooks |
Hooks for subtypes of as_list to implement.
Definition at line 81 of file modules/common/src/include/aerospike/as_list.h.