ConOpSys V2970  P004.07
ANVILEX control operating system
List.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Description : List implementation
3 // Filename : List.h
4 //------------------------------------------------------------------------------
5 
6 #pragma once
7 
8 //--- Include header files -----------------------------------------------------
9 
10 #include "Define.h"
11 
12 //--- Class TList --------------------------------------------------------------
13 
14 class TList
15 {
16 
17  public:
18 
19  TList(); // Constructor
20  ~TList(); // Destructor
21  I32 GetCount(); // Get item count
22  VOID Clear(); // Clear list
23  BOOL IsEmpty(); // Is empty
24  VOID Add( VOID *Pointer ); // Add item
25  VOID *First(); // Get first item
26  VOID *Last(); // Get last item
27  VOID *GetItem( I32 ItemIndex ); // Get item by index
28 // VOID SetItem( I32 ItemIndex, VOID *Pointer );
29  VOID Remove( I32 ItemIndex ); // Remove item from list
30 
31  private:
32 
33  I32 Count; // Items count
34  TListItem *FirstItem; // Pointer to first item
35  TListItem *LastItem; // Pointer to last item
36  TListItem *GetListItemByIndex( I32 ItemIndex ); // Get list item by index
37 
38 };
39 
40 //------------------------------------------------------------------------------
41 // End of file
42 //------------------------------------------------------------------------------
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
long I32
2s Compliment 32-Bit signed integer datatype defenition
Definition: Defines.h:206
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
Definition: List.h:15
VOID * Last()
Definition: List.cpp:139
TListItem * GetListItemByIndex(I32 ItemIndex)
Definition: List.cpp:218
~TList()
Definition: List.cpp:35
BOOL IsEmpty()
Definition: List.cpp:55
VOID * First()
Definition: List.cpp:129
I32 GetCount()
Definition: List.cpp:45
VOID Clear()
Definition: List.cpp:65
VOID * GetItem(I32 ItemIndex)
Definition: List.cpp:149
I32 Count
Definition: List.h:33
TListItem * LastItem
Definition: List.h:35
TList()
Definition: List.cpp:21
TListItem * FirstItem
Definition: List.h:34
VOID Add(VOID *Pointer)
Definition: List.cpp:97
VOID Remove(I32 ItemIndex)
Definition: List.cpp:194