[ CCUnit project page ] |  | [ CCUnit home page ]

Data Structures | Typedefs | Functions

# ListIterator
[List]

List iterator. More...

Collaboration diagram for ListIterator:

## Data Structures
struct | CCUnitListIterator
| list iterator. More...
## Typedefs
typedef struct CCUnitListIterator | CCUnitListIterator
| list iterator.
## Functions
CCUnitListIterator * | ccunit_newListIterator (const struct CCUnitList *list)
| create new list iterator.
CCUnitListIterator * | ccunit_initListIterator (const struct CCUnitList *list, struct CCUnitListIterator *it)
| initialize list iterator.
void | ccunit_deleteListIterator (struct CCUnitListIterator *it)
| delete list iterator.
void * | ccunit_nextListIterator (struct CCUnitListIterator *it)
| Get next element.
bool | ccunit_hasNextListIterator (struct CCUnitListIterator *it)
| Check is there next element of iterator.

## Detailed Description

List iterator.

## Typedef Documentation

typedef struct CCUnitListIterator CCUnitListIterator

list iterator.

## Function Documentation

void ccunit_deleteListIterator | ( | struct CCUnitListIterator * | it | ) | `[inline]`

delete list iterator.

Parameters:

  | it | iterator to delete.

References isAllocated, and safe_free.

Referenced by printFailures().

Here is the caller graph for this function:

bool ccunit_hasNextListIterator | ( | struct CCUnitListIterator * | it | ) |

Check is there next element of iterator.

Parameters:

  | it | An iterator.

Returns:
  true if there is next element, or false.

References current.

Referenced by ccunit_nextListIterator().

Here is the caller graph for this function:

CCUnitListIterator* ccunit_initListIterator | ( | const struct CCUnitList * | list,
|  | struct CCUnitListIterator * | it |
| ) |  |  | `[inline]`

initialize list iterator.

Parameters:

  | list | An owner list of iterator.
  | it | Iterator to initialize.

Returns:
  Initialized iterator.

References current, CCUnitList::head, and isAllocated.

Referenced by _ccunit_endTest(), _ccunit_startTest(), ccunit_newListIterator(), printFixture(), printPrototypes(), printSuite(), and run().

Here is the caller graph for this function:

CCUnitListIterator* ccunit_newListIterator | ( | const struct CCUnitList * | list | ) |

create new list iterator.

Parameters:

  | list | An owner list of iterator.

Returns:
  New iterator.

References ccunit_initListIterator(), and isAllocated.

Here is the call graph for this function:

void* ccunit_nextListIterator | ( | struct CCUnitListIterator * | it | ) |

Get next element.

Parameters:

  | it | An Iterator.

Returns:
  pointer to next element object.

References ccunit_hasNextListIterator(), CCUnitListCell::contents, current, and CCUnitListCell::next.

Referenced by _ccunit_endTest(), _ccunit_startTest(), printFailures(), printFixture(), printPrototypes(), printSuite(), and run().

Here is the call graph for this function:

Here is the caller graph for this function:

| hosts this site. |  | Send comments to: CCUnit Developer |