Mon Jun 27 16:51:23 2011

Asterisk developer's documentation


ao2_iterator Struct Reference

When we need to walk through a container, we use an ao2_iterator to keep track of the current position. The astobj2 iterator. More...

#include <astobj2.h>


Data Fields

int bucket
ao2_containerc
unsigned int c_version
int flags
void * obj
unsigned int version


Detailed Description

When we need to walk through a container, we use an ao2_iterator to keep track of the current position. The astobj2 iterator.

Note:
You are not supposed to know the internals of an iterator! We would like the iterator to be opaque, unfortunately its size needs to be known if we want to store it around without too much trouble. Anyways... The iterator has a pointer to the container, and a flags field specifying various things e.g. whether the container should be locked or not while navigating on it. The iterator "points" to the current object, which is identified by three values:

Details are in the implementation of ao2_iterator_next() A freshly-initialized iterator has bucket=0, version=0.

Definition at line 1042 of file astobj2.h.


Field Documentation

int bucket

current bucket

Definition at line 1048 of file astobj2.h.

Referenced by internal_ao2_iterator_next().

struct ao2_container* c

the container

Definition at line 1044 of file astobj2.h.

Referenced by __ao2_callback(), __ao2_callback_data(), __ao2_callback_data_debug(), __ao2_callback_debug(), __ao2_find(), __ao2_find_debug(), __ao2_iterator_next(), __ao2_iterator_next_debug(), ao2_iterator_destroy(), ao2_iterator_init(), internal_ao2_callback(), internal_ao2_iterator_next(), and manager_optimize_away().

unsigned int c_version

container version

Definition at line 1050 of file astobj2.h.

Referenced by internal_ao2_iterator_next().

int flags

operation flags

Definition at line 1046 of file astobj2.h.

Referenced by __ao2_iterator_next(), __ao2_iterator_next_debug(), ao2_iterator_destroy(), ao2_iterator_init(), and internal_ao2_iterator_next().

void* obj

pointer to the current object

Definition at line 1052 of file astobj2.h.

Referenced by internal_ao2_iterator_next().

unsigned int version

container version when the object was created

Definition at line 1054 of file astobj2.h.

Referenced by internal_ao2_iterator_next().


The documentation for this struct was generated from the following file:
Generated on Mon Jun 27 16:51:23 2011 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7