ConOpSys V2970  P004.07
ANVILEX control operating system
Circular_List.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Description : ConOS-Kernel
3 // Filename : CircularList.h
4 //------------------------------------------------------------------------------
5 
6 #pragma once
7 
8 //--- Include header files -----------------------------------------------------
9 
10 #include "Defines.h"
11 
12 #include "List_Item.h"
13 
14 //--- Class TCircularList ------------------------------------------------------
15 
17 {
18 
19  //----------------------------------------------------------------------------
20  // Public defines, methods and variables
21  //----------------------------------------------------------------------------
22 
23  public:
24 
25  TCircularList(); // Constructor
26  ~TCircularList(); // Destructor
27  U32 GetCount(); // Get item count
28  VOID Clear(); // Clear list
29  BOOL IsEmpty(); // Is empty
30  BOOL Exists( VOID *Pointer ); // Check for item exists
31  VOID AddNext( VOID *Pointer ); // Add item to front
32 // VOID AddPrevious( VOID *Pointer ); // Add item to back
33  BOOL Delete( VOID *Pointer ); // Delete item
34  BOOL Delete(); // Delete current item
35  VOID *Previous(); // Get previons item
36  VOID *Current(); // Get current item
37  VOID *Next(); // Get next item
38  VOID *MovePrevious(); // Move pointer to next item
39  VOID *MoveNext(); // Move pointer to previous item
40 
41  //----------------------------------------------------------------------------
42  // Protected defines, methods and variables
43  //----------------------------------------------------------------------------
44 
45  protected:
46 
47  //----------------------------------------------------------------------------
48  // Private defines, methods and variables
49  //----------------------------------------------------------------------------
50 
51  private:
52 
53  //--------------------------------------------------------------------------
54  // Private variables
55  //--------------------------------------------------------------------------
56 
57  //! @brief Items count
58  U32 u32_Count = (U32)0;
59 
60  //! @brief Pointer to current item
62 
63 };
64 
65 //------------------------------------------------------------------------------
66 // End of file
67 //------------------------------------------------------------------------------
ConOpSys data type definitions header file.
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
#define NULL
Definition: Defines.h:388
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
List generic item class header file.
Definition: Circular_List.h:17
BOOL IsEmpty()
Definition: Circular_List.cpp:49
TList_Item * CurrentItem
Pointer to current item.
Definition: Circular_List.h:61
VOID * Next()
Definition: Circular_List.cpp:466
VOID * Previous()
Definition: Circular_List.cpp:409
VOID * Current()
Definition: Circular_List.cpp:451
VOID * MovePrevious()
Definition: Circular_List.cpp:345
BOOL Exists(VOID *Pointer)
Definition: Circular_List.cpp:102
U32 u32_Count
Items count.
Definition: Circular_List.h:58
BOOL Delete()
Definition: Circular_List.cpp:266
TCircularList()
Definition: Circular_List.cpp:17
~TCircularList()
Definition: Circular_List.cpp:25
VOID AddNext(VOID *Pointer)
Definition: Circular_List.cpp:145
VOID * MoveNext()
Definition: Circular_List.cpp:381
U32 GetCount()
Definition: Circular_List.cpp:37
VOID Clear()
Definition: Circular_List.cpp:61
List generic item class.
Definition: List_Item.h:54