Defines | |
| #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. | |
| #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_ITEM_FIELDS | ( | ListT, | |||
| ItemT, | |||||
| Name | ) |
friend class ListT; \ ItemT *m_##Name##_Prev, *m_##Name##_Next; \ bool m_##NAME##_IsOnList;
Declares list item fields. Use in item class definition in chosen section (private recommended).
| #define STATIC_OBJLIST_ITEM_METHODS | ( | ListT, | |||
| ItemT, | |||||
| Name | ) |
bool Name##_IsOnList() { return m_##Name##_IsOnList; } \ ItemT * Name##_GetPrev() { return m_##Name##_Prev; } \ ItemT * Name##_GetNext() { return m_##Name##_Next; }
Defines inline list item methods. Use in item class definition in chosen section (public recommended).
| #define STATIC_OBJLIST_LIST_FIELDS | ( | ListT, | |||
| ItemT, | |||||
| Name | ) |
static ItemT *m_##Name##_First, *m_##Name##_Last; \ static uint m_##Name##_ItemCount;
Declares list class static fields. Use in list class definition in chosen section (private 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.
| #define STATIC_OBJLIST_LIST_METHODS | ( | ListT, | |||
| ItemT, | |||||
| Name | ) |
static ItemT * Name##_GetFirst() { return m_##Name##_First; } \ static ItemT * Name##_GetLast() { return m_##Name##_Last; } \ static uint Name##_GetItemCount() { return m_##Name##_ItemCount; } \ static bool Name##_IsEmpty() { return m_##Name##_ItemCount == 0; } \ static void Name##_InsertBack(ItemT *v); \ static void Name##_InsertFront(ItemT *v); \ static void Name##_InsertAfter(ItemT *v, ItemT *existingItem); \ static void Name##_InsertBefore(ItemT *v, ItemT *existingItem); \ static void Name##_Remove(ItemT *v); \ static void Name##_Clear();
Declares list class static methods. Use in list class definition in chosen section (public recommended).
1.6.1