XBinder  Version 2.7.x
rtxScalarDList.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2020 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  *****************************************************************************/
28 #ifndef _RTXSCALARDLIST_H_
29 #define _RTXSCALARDLIST_H_
30 
31 #include "rtxsrc/osSysTypes.h"
32 #include "rtxsrc/rtxExternDefs.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 struct OSCTXT;
39 
40 /* Kept externally to avoid breakage on intolerant compilers like aCC. */
41 typedef enum {
42  ScalarDList_undefined,
43  ScalarDList_double,
44  ScalarDList_float,
45  ScalarDList_int32,
46  ScalarDList_uint32,
47  ScalarDList_int64,
48  ScalarDList_uint64
49 } e_ident;
68 typedef struct OSRTScalarDListNode {
69  e_ident ident;
70 
71  union {
72  OSDOUBLE dfltval;
73  OSFLOAT fltval;
74  OSINT32 i32val;
75  OSUINT32 ui32val;
76 #if !defined(_NO_INT64_SUPPORT)
77  OSINT64 i64val;
78  OSUINT64 ui64val;
79 #endif
80  } u;
81 
85 
92 typedef struct OSRTScalarDList {
93  OSUINT32 count;
97 
106 EXTERNRT void rtxScalarDListInit (OSRTScalarDList* pList);
107 
124 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSDOUBLE value);
125 
126 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendFloat
127 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSFLOAT value);
128 
129 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendInt32
130 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSINT32 value);
131 
132 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendUInt32
133 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSUINT32 value);
134 
135 #if !defined(_NO_INT64_SUPPORT)
136 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendInt64
137 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSINT64 value);
138 
139 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendUInt64
140 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSUINT64 value);
141 #endif
142 
159 (OSRTScalarDList* pList, OSRTScalarDListNode* pListNode);
160 
177 (OSRTScalarDList* pList, OSUINT32 idx, OSRTScalarDListNode* pListNode);
178 
192 EXTERNRT OSRTScalarDListNode*
193 rtxScalarDListFindByIndex (const OSRTScalarDList* pList, OSUINT32 idx);
194 
204 EXTERNRT void rtxScalarDListFreeNode
205 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSRTScalarDListNode* node);
206 
213 EXTERNRT void rtxScalarDListRemove
214 (OSRTScalarDList* pList, OSRTScalarDListNode* node);
215 
223 EXTERNRT void rtxScalarDListFreeNodes
224 (struct OSCTXT* pctxt, OSRTScalarDList* pList);
225 
226 #ifdef __cplusplus
227 }
228 #endif
229 
232 #endif
OSUINT32 ui32val
32-bit unsigned integer
OSFLOAT fltval
Single prec floating point value.
This is the main list structure.
OSINT64 i64val
64-bit signed integer
EXTERNRT void rtxScalarDListFreeNodes(struct OSCTXT *pctxt, OSRTScalarDList *pList)
This function will free all of the dynamic memory used to hold the list node pointers.
struct OSRTScalarDListNode * next
Pointer to next node in list.
OSRTScalarDListNode * tail
Pointer to last entry in list.
EXTERNRT void rtxScalarDListInit(OSRTScalarDList *pList)
This function initializes a doubly linked list structure.
EXTERNRT void rtxScalarDListRemove(OSRTScalarDList *pList, OSRTScalarDListNode *node)
This function will remove the given node from the list.
OSUINT32 count
Count of items in the list.
EXTERNRT OSRTScalarDListNode * rtxScalarDListInsertNode(OSRTScalarDList *pList, OSUINT32 idx, OSRTScalarDListNode *pListNode)
This function is used to insert a node into the linked list.
This structure is used to hold a single data item within the list.
EXTERNRT OSRTScalarDListNode * rtxScalarDListFindByIndex(const OSRTScalarDList *pList, OSUINT32 idx)
This function will return the node pointer of the indexed entry in the list.
EXTERNRT OSRTScalarDListNode * rtxScalarDListAppendDouble(struct OSCTXT *pctxt, OSRTScalarDList *pList, OSDOUBLE value)
This set of functions appends an item of the given scalar type to the linked list structure...
OSDOUBLE dfltval
Double prec floating point value.
OSUINT64 ui64val
64-bit unsigned integer
EXTERNRT OSRTScalarDListNode * rtxScalarDListAppendNode(OSRTScalarDList *pList, OSRTScalarDListNode *pListNode)
This function is used to append a node to the linked list.
EXTERNRT void rtxScalarDListFreeNode(struct OSCTXT *pctxt, OSRTScalarDList *pList, OSRTScalarDListNode *node)
This function will remove the given node from the list and free memory.
Run-time context structure.
Definition: rtxContext.h:197
Common definitions of external function modifiers used to define the scope of functions used in DLL's...
OSRTScalarDListNode * head
Pointer to first entry in list.
OSINT32 i32val
32-bit signed integer
struct OSRTScalarDListNode * prev
Pointer to previous node in list.