CCUnit: List

CCUnit 2.1 A C Unit Testing Library

- メインページ
- 関連ページ
- モジュール
- データ構造
- ファイル

全て データ構造 ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義 グループ ページ
モジュール | データ構造 | 型定義 | 関数
List
モジュール階層

Linked list container. [詳細]

Listのコラボレーション図

## モジュール
| ListCell
| Linked list cell.
| ListIterator
| List iterator.

## データ構造
struct | CCUnitList
| list container. [詳細]

## 型定義
typedef struct CCUnitList | CCUnitList
| list container.

## 関数
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.

## 説明

Linked list container.

## 型定義

typedef struct CCUnitList CCUnitList

list container.

## 関数

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

Add element to list object.

引数:

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

参照先 ccunit_newListCell(), CCUnitListCell::contents, length, CCUnitListCell::next, と tailp.

参照元 addTestDef(), ccunit_addFailure(), ccunit_addResultListener(), ccunit_addTest(), ccunit_addTestFunc(), と readTestCase().

関数の呼び出しグラフ:

呼出しグラフ:

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

Delete list object.

引数:

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

参照先 ccunit_deleteListCell(), CCUnitListCell::contents, head, isAllocated, CCUnitListCell::next, と safe_free.

参照元 ccunit_deleteTestResult(), destroy(), destroyTestCaseDef(), と destroyTestSuiteDef().

関数の呼び出しグラフ:

呼出しグラフ:

void ccunit_deleteListIterator | ( | struct CCUnitListIterator * | it | ) |
| inline

delete list iterator.

引数:

  it | iterator to delete.

参照先 CCUnitListIterator::isAllocated, と safe_free.

参照元 printFailures().

呼出しグラフ:

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

Check is there next element of iterator.

引数:

  it | An iterator.

戻り値:
  true if there is next element, or false.

参照先 CCUnitListIterator::current.

参照元 ccunit_nextListIterator().

呼出しグラフ:

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

Initialize list object.

引数:

  list | initializing list.

戻り値:
  initialized list.

参照先 head, isAllocated, length, と tailp.

参照元 ccunit_newList(), ccunit_newTestCase(), ccunit_newTestResult(), ccunit_newTestSuite(), ccunit_newTestSuiteDef(), と newTestCaseDef().

呼出しグラフ:

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

initialize list iterator.

引数:

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

戻り値:
  Initialized iterator.

参照先 CCUnitListIterator::current, head, と CCUnitListIterator::isAllocated.

参照元 _ccunit_endTest(), _ccunit_startTest(), ccunit_addFailure(), ccunit_newListIterator(), printPrototypes(), printSuite(), printTestCase(), と run().

呼出しグラフ:

CCUnitList * ccunit_newList | ( |  | ) |
| inline

Create new list object.

戻り値:
  new list object.

参照先 ccunit_initList(), と isAllocated.

関数の呼び出しグラフ:

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

create new list iterator.

引数:

  list | An owner list of iterator.

戻り値:
  New iterator.

参照先 ccunit_initListIterator(), と CCUnitListIterator::isAllocated.

参照元 ccunit_failures().

関数の呼び出しグラフ:

呼出しグラフ:

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

Get next element.

引数:

  it | An Iterator.

戻り値:
  pointer to next element object.

参照先 ccunit_hasNextListIterator(), CCUnitListCell::contents, CCUnitListIterator::current, と CCUnitListCell::next.

参照元 _ccunit_endTest(), _ccunit_startTest(), ccunit_addFailure(), printFailures(), printPrototypes(), printSuite(), printTestCase(), と run().

関数の呼び出しグラフ:

呼出しグラフ:

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