ObjP.h 982 B

12345678910111213141516171819202122232425262728
  1. /*****************************************************************************/
  2. /* ObjP.h - A library for object list. */
  3. /* */
  4. /* ObjP.h Copyright (c) 2000 Sakai Hiroaki. */
  5. /* All Rights Reserved. */
  6. /*****************************************************************************/
  7. #ifndef _SAKAILIB_OBJP_H_INCLUDED_
  8. #define _SAKAILIB_OBJP_H_INCLUDED_
  9. #include "Obj.h"
  10. /* データ格納用構造体 */
  11. typedef struct _ObjListData {
  12. struct _ObjListData * prev; /* 前のデータ */
  13. struct _ObjListData * next; /* 次のデータ */
  14. Obj obj; /* オブジェクト */
  15. Obj (*destructor)(Obj); /* 削除時に呼ばれるデストラクタ */
  16. } _ObjListData;
  17. /* リスト構造の管理用 */
  18. typedef struct _ObjList {
  19. struct _ObjListData * start_edge;
  20. struct _ObjListData * end_edge;
  21. int length;
  22. } _ObjList;
  23. #endif