ConOpSys V2970  P004.07
ANVILEX control operating system
List_Item.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file List_Item.h
3 //! @brief List generic item class header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2002-2021 ANVILEX
6 //! $HeadURL: $
7 //! $Revision: $
8 //! $Date: $
9 //! $Author: minch $
10 //------------------------------------------------------------------------------
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions are met:
14 //
15 // 1. Redistributions of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of ANVILEX nor the names of its contributors may be
23 // used to endorse or promote products derived from this software without
24 // specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 // POSSIBILITY OF SUCH DAMAGE.
37 //
38 //------------------------------------------------------------------------------
39 
40 #pragma once
41 
42 //------------------------------------------------------------------------------
43 // Include project files
44 //------------------------------------------------------------------------------
45 
46 #include "Defines.h"
47 
48 //------------------------------------------------------------------------------
49 // Class definitions
50 //------------------------------------------------------------------------------
51 
52 //! @brief List generic item class
54 {
55 
56  //----------------------------------------------------------------------------
57  // Public defines, methods and variables
58  //----------------------------------------------------------------------------
59 
60  public:
61 
62  //--------------------------------------------------------------------------
63  // Public methods
64  //--------------------------------------------------------------------------
65 
66  //!-------------------------------------------------------------------------
67  //! @brief Class constructor method
68  //! @note None
69  //! @param [in] *object_Previous_Item - Pointer to the previous item
70  //! @param [in] *object_Next_Item - Pointer to the next item
71  //! @param [in] *object_Data - Pointer to the item data
72  //! \par Override
73  //! Not allowed
74  //! @attention Don't call this method directly.
75  //--------------------------------------------------------------------------
76 
78 
79  //!-------------------------------------------------------------------------
80  //! @brief Class destructor method
81  //! @note None
82  //! \par Override
83  //! Not allowed
84  //! @attention Don't call this method directly.
85  //--------------------------------------------------------------------------
86 
87  ~TList_Item();
88 
89  //!-------------------------------------------------------------------------
90  //! @brief Get pointer to the previous item
91  //! @note None
92  //! @return TList_Item - Pointer to the previous item
93  //! \par Override
94  //! Not allowed
95  //! @attention None
96  //--------------------------------------------------------------------------
97 
99 
100  //!-------------------------------------------------------------------------
101  //! @brief Get pointer to the next item
102  //! @note None
103  //! @return TList_Item - Pointer to the next item
104  //! \par Override
105  //! Not allowed
106  //! @attention None
107  //--------------------------------------------------------------------------
108 
109  TList_Item *Next();
110 
111  //!-------------------------------------------------------------------------
112  //! @brief Get pointer to the item data
113  //! @note None
114  //! @return VOID* - Pointer to the next item
115  //! \par Override
116  //! Not allowed
117  //! @attention None
118  //--------------------------------------------------------------------------
119 
120  VOID *Data();
121 
122  //!-------------------------------------------------------------------------
123  //! @brief Set pointer to the previous item
124  //! @note None
125  //! @param [in] *object_New_Previous_Item - Pointer to the new previous item
126  //! @return None
127  //! \par Override
128  //! Not allowed
129  //! @attention None
130  //--------------------------------------------------------------------------
131 
132  VOID Set_Previous( TList_Item *object_New_Previous_Item );
133 
134  //!-------------------------------------------------------------------------
135  //! @brief Set pointer to the next item
136  //! @note None
137  //! @param [in] *object_New_Next_Item - Pointer to the new next item
138  //! @return None
139  //! \par Override
140  //! Not allowed
141  //! @attention None
142  //--------------------------------------------------------------------------
143 
144  VOID Set_Next( TList_Item *object_New_Next_Item );
145 
146  //----------------------------------------------------------------------------
147  // Protected defines, methods and variables
148  //----------------------------------------------------------------------------
149 
150  protected:
151 
152  //----------------------------------------------------------------------------
153  // Private defines, methods and variables
154  //----------------------------------------------------------------------------
155 
156  private:
157 
158  //--------------------------------------------------------------------------
159  // Private variables
160  //--------------------------------------------------------------------------
161 
162  //! @brief Pointer to previous item
164 
165  //! @brief Pointer to next item
167 
168  //! @brief Pointer to data
170 
171 };
172 
173 //------------------------------------------------------------------------------
174 // End of file
175 //------------------------------------------------------------------------------
ConOpSys data type definitions header file.
#define NULL
Definition: Defines.h:388
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
List generic item class.
Definition: List_Item.h:54
TList_Item * Previous()
Get pointer to the previous item.
Definition: List_Item.cpp:103
VOID Set_Previous(TList_Item *object_New_Previous_Item)
Set pointer to the previous item.
Definition: List_Item.cpp:139
TList_Item * object_Next_Item
Pointer to next item.
Definition: List_Item.h:166
VOID Set_Next(TList_Item *object_New_Next_Item)
Set pointer to the next item.
Definition: List_Item.cpp:151
TList_Item * object_Previous_Item
Pointer to previous item.
Definition: List_Item.h:163
TList_Item(TList_Item *object_Previous_Item, TList_Item *object_Next_Item, VOID *object_Data)
Class constructor method.
Definition: List_Item.cpp:50
VOID * Data()
Get pointer to the item data.
Definition: List_Item.cpp:127
VOID * object_Data
Pointer to data.
Definition: List_Item.h:169
~TList_Item()
Class destructor method.
Definition: List_Item.cpp:68
TList_Item * Next()
Get pointer to the next item.
Definition: List_Item.cpp:115