JULEA
Data Structures | Typedefs | Functions
Object Iterator

Data Structures

struct  JObjectIterator
 

Typedefs

typedef struct JObjectIterator JObjectIterator
 

Functions

JObjectIteratorj_object_iterator_new (gchar const *namespace, gchar const *prefix)
 
JObjectIteratorj_object_iterator_new_for_index (guint32 index, gchar const *namespace, gchar const *prefix)
 
void j_object_iterator_free (JObjectIterator *iterator)
 
gboolean j_object_iterator_next (JObjectIterator *iterator)
 
gchar const * j_object_iterator_get (JObjectIterator *iterator)
 

Detailed Description

Data structures and functions for iterating over objects.

Typedef Documentation

◆ JObjectIterator

Function Documentation

◆ j_object_iterator_free()

void j_object_iterator_free ( JObjectIterator iterator)

Frees the memory allocated by the JObjectIterator.

Parameters
iteratorA JObjectIterator.

◆ j_object_iterator_get()

gchar const * j_object_iterator_get ( JObjectIterator iterator)

Returns the current collection.

Parameters
iteratorA store iterator.
Returns
A new collection. Should be freed with j_object_unref().

◆ j_object_iterator_new()

JObjectIterator * j_object_iterator_new ( gchar const *  namespace,
gchar const *  prefix 
)

Creates a new JObjectIterator.

Parameters
namespaceThe namespace to iterate over.
prefixPrefix of names to iterate over. Set to NULL to iterate over all objects in the namespace.
Returns
A new JObjectIterator.
Todo:
j_backend_object_get_all(iterator->object_backend, namespace, &(iterator->cursor));
Todo:
j_backend_object_get_by_prefix(iterator->object_backend, namespace, prefix, &(iterator->cursor));

◆ j_object_iterator_new_for_index()

JObjectIterator * j_object_iterator_new_for_index ( guint32  index,
gchar const *  namespace,
gchar const *  prefix 
)

Creates a new JObjectIterator on a specific object server.

Parameters
indexServer to query.
namespaceJKV namespace to iterate over.
prefixPrefix of names to iterate over. Set to NULL to iterate over all objects in the namespace.
Returns
A new JObjectIterator.
Todo:
still necessary?
Todo:
j_backend_object_get_all(iterator->object_backend, namespace, &(iterator->cursor));
Todo:
j_backend_object_get_by_prefix(iterator->object_backend, namespace, prefix, &(iterator->cursor));

◆ j_object_iterator_next()

gboolean j_object_iterator_next ( JObjectIterator iterator)

Checks whether another collection is available.

Parameters
iteratorA store iterator.
Returns
TRUE on success, FALSE if the end of the store is reached.
Todo:
ret = j_backend_object_iterate(iterator->object_backend, iterator->cursor, &(iterator->key), &(iterator->value), &(iterator->len));