ObjList.hpp File Reference

Macros for creating doubly-linked list of objects. More...

Go to the source code of this file.

Namespaces

namespace  common
 

Główna przestrzeń nazw biblioteki CommonLib.


Defines

#define OBJLIST_ITEM_FIELDS(ListT, ItemT, Name)
 Declares list item fields. Use in item class definition in chosen section (private recommended).
#define OBJLIST_ITEM_METHODS(ListT, ItemT, Name)
 Defines inline list item methods. Use in item class definition in chosen section (public recommended).
#define OBJLIST_ITEM_CTOR(ListT, ItemT, Name)   { m_##Name##_Prev = m_##Name##_Next = NULL; m_##Name##_List = NULL; }
 Initializes list item fields. Use in body of item class constructor.
#define OBJLIST_ITEM_DTOR(ListT, ItemT, Name)   { if (m_##Name##_List) m_##Name##_List->Name##_Remove(this); }
 Removes itself from the list if present on the list. Use in body of item class destructor.
#define OBJLIST_LIST_FIELDS(ListT, ItemT, Name)
 Declares list class static fields. Use in list class definition in chosen section (private recommended).
#define OBJLIST_LIST_METHODS(ListT, ItemT, Name)
 Declares list class methods. Use in list class definition in chosen section (public recommended).
#define OBJLIST_LIST_CTOR(ListT, ItemT, Name)   { m_##Name##_First = m_##Name##_Last = NULL; m_##Name##_ItemCount = 0; }
 Initializes list class fields. Use in body of list class constructor.
#define OBJLIST_LIST_DTOR(ListT, ItemT, Name)
 Removes all items from the list. Use in body of list class destructor.
#define OBJLIST_LIST_IMPL(ListT, ItemT, Name)
 Defines list class methods implementation. Use in CPP file with implementation of list class.
#define STATIC_OBJLIST_ITEM_FIELDS(ListT, ItemT, Name)
 Declares list item fields. Use in item class definition in chosen section (private recommended).
#define STATIC_OBJLIST_ITEM_METHODS(ListT, ItemT, Name)
 Defines inline list item methods. Use in item class definition in chosen section (public recommended).
#define STATIC_OBJLIST_ITEM_CTOR(ListT, ItemT, Name)   { m_##Name##_Prev = m_##Name##_Next = NULL; m_##Name##_IsOnList = false; }
 Initializes list item fields. Use in body of item class constructor.
#define STATIC_OBJLIST_ITEM_DTOR(ListT, ItemT, Name)   { if (m_##Name##_IsOnList) ListT::##Name##_Remove(this); }
 Removes itself from the list if present on the list. Use in body of item class destructor.
#define STATIC_OBJLIST_LIST_FIELDS(ListT, ItemT, Name)
 Declares list class static fields. Use in list class definition in chosen section (private recommended).
#define STATIC_OBJLIST_LIST_METHODS(ListT, ItemT, Name)
 Declares list class static methods. Use in list class definition in chosen section (public recommended).
#define STATIC_OBJLIST_LIST_IMPL(ListT, ItemT, Name)
 Defines list class static fields and methods implementation. Use in CPP file with implementation of list class.

Detailed Description

Macros for creating doubly-linked list of objects.

Author:
Adam Sawicki - sawickiap@poczta.onet.pl - http://regedit.gamedev.pl/

Part of the CommonLib library.
Encoding Windows-1250, end of line CR+LF, test: Zażółć gęślą jaźń
License: GNU LGPL.
Documentation: Module_ObjList
Module components: ObjList Module


Generated on Wed Dec 16 20:44:52 2009 for CommonLib by  doxygen 1.6.1