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

Data Structures | Modules | Typedefs | Functions

# List
[Module hierarchy]

Linked list container. More...

Collaboration diagram for List:

## Data Structures
struct | CCUnitList
| list container. More...
## Modules
| ListCell

| Linked list cell.
| ListIterator

| List iterator.
## Typedefs
typedef struct CCUnitList | CCUnitList
| list container.
## Functions
CCUnitList * | ccunit_initList (CCUnitList *list)
| Initialize list object.
CCUnitList * | ccunit_newList ()
| Create new list object.
void | ccunit_addList (CCUnitList *list, void *contents)
| Add element to list object.
void | ccunit_deleteList (CCUnitList *list, void(*deleteContents)(void *))
| Delete list object.
CCUnitListIterator * | ccunit_initListIterator (const struct CCUnitList *list, struct CCUnitListIterator *it)
| initialize list iterator.
CCUnitListIterator * | ccunit_newListIterator (const struct CCUnitList *list)
| create new list iterator.
bool | ccunit_hasNextListIterator (struct CCUnitListIterator *it)
| Check is there next element of iterator.
void * | ccunit_nextListIterator (struct CCUnitListIterator *it)
| Get next element.
void | ccunit_deleteListIterator (struct CCUnitListIterator *it)
| delete list iterator.

## Detailed Description

Linked list container.

## Typedef Documentation

typedef struct CCUnitList CCUnitList

list container.

## Function Documentation

void ccunit_addList | ( | CCUnitList * | list,
|  | void * | contents |
| ) |  |  |

Add element to list object.

Parameters:

  | list | List object.
  | contents | A pointer to an object to register in the list.

Referenced by addTestDef(), ccunit_addTestCase(), and readTestFixture().

Here is the caller graph for this function:

void ccunit_deleteList | ( | CCUnitList * | list,
|  | void(*)(void *) | deleteContents |
| ) |  |  |

Delete list object.

Parameters:

  | list | Deleting list.
  | deleteContents | A pointer to the function which the object registered in the list is deleted from.

Referenced by destroy(), destroyTestFixtureDef(), and destroyTestSuiteDef().

Here is the caller graph for this function:

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

delete list iterator.

Parameters:

  | it | iterator to delete.

References CCUnitListIterator::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 CCUnitListIterator::current.

Referenced by ccunit_nextListIterator().

Here is the caller graph for this function:

CCUnitList * ccunit_initList | ( | CCUnitList * | list | ) |

Initialize list object.

Parameters:

  | list | initializing list.

Returns:
  initialized list.

Referenced by ccunit_newTestFixture(), ccunit_newTestSuiteDef(), and newTestFixtureDef().

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 CCUnitListIterator::current, head, and CCUnitListIterator::isAllocated.

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

Here is the caller graph for this function:

CCUnitList * ccunit_newList | ( |  | ) | `[inline]`

Create new list object.

Returns:
  new list object.

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 CCUnitListIterator::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, CCUnitListIterator::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 |