ASN1C C/C++ Common Runtime  ASN1C v7.3.x
rtxSList.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2019 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
24 
28 #ifndef _RTXSLIST_H_
29 #define _RTXSLIST_H_
30 
31 #include "rtxsrc/rtxContext.h"
32 
55 typedef struct _OSRTSListNode {
56  void* data;
57  struct _OSRTSListNode* next;
59 
60 struct OSCTXT;
61 
68 typedef struct _OSRTSList {
69  OSSIZE count;
72  struct OSCTXT* pctxt;
73 } OSRTSList;
74 
75 #ifdef __cplusplus
76 extern "C" {
77 #endif
78 
85 EXTERNRT void rtxSListInit (OSRTSList* pList);
86 
98 EXTERNRT void rtxSListInitEx (OSCTXT* pctxt, OSRTSList* pList);
99 
108 EXTERNRT void rtxSListFree (OSRTSList* pList);
109 
119 EXTERNRT void rtxSListFreeAll (OSRTSList* pList);
120 
127 EXTERNRT OSRTSList* rtxSListCreate (OSVOIDARG);
128 
140 EXTERNRT OSRTSList* rtxSListCreateEx (OSCTXT* pctxt);
141 
152 EXTERNRT OSRTSListNode* rtxSListAppend (OSRTSList* pList, void* pData);
153 
165 EXTERNRT OSBOOL rtxSListFind (OSRTSList* pList, void* pData);
166 
176 EXTERNRT void rtxSListRemove (OSRTSList* pList, void* pData);
177 
182 #define OSALLOCELEMSNODE(pctxt,type) \
183 (type*) (((char*)rtxMemAllocZ (pctxt, sizeof(type) + \
184 sizeof(OSRTSListNode))) + sizeof(OSRTSListNode))
185 
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif
void rtxSListFree(OSRTSList *pList)
void * data
Definition: rtxSList.h:56
OSRTSListNode * head
Definition: rtxSList.h:70
Definition: rtxSList.h:68
OSBOOL rtxSListFind(OSRTSList *pList, void *pData)
void rtxSListFreeAll(OSRTSList *pList)
OSSIZE count
Definition: rtxSList.h:69
OSRTSList * rtxSListCreateEx(OSCTXT *pctxt)
void rtxSListInit(OSRTSList *pList)
void rtxSListInitEx(OSCTXT *pctxt, OSRTSList *pList)
OSRTSListNode * tail
Definition: rtxSList.h:71
OSRTSList * rtxSListCreate(OSVOIDARG)
OSRTSListNode * rtxSListAppend(OSRTSList *pList, void *pData)
void rtxSListRemove(OSRTSList *pList, void *pData)
Definition: rtxSList.h:55
Definition: rtxContext.h:185
struct _OSRTSListNode * next
Definition: rtxSList.h:57