00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef _RTXSCALARDLIST_H_
00029 #define _RTXSCALARDLIST_H_
00030
00031 #include "rtxsrc/osSysTypes.h"
00032 #include "rtxsrc/rtxExternDefs.h"
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00038 struct OSCTXT;
00039
00040
00041 typedef enum {
00042 ScalarDList_undefined,
00043 ScalarDList_double,
00044 ScalarDList_float,
00045 ScalarDList_int32,
00046 ScalarDList_uint32,
00047 ScalarDList_int64,
00048 ScalarDList_uint64
00049 } e_ident;
00068 typedef struct OSRTScalarDListNode {
00069 e_ident ident;
00070
00071 union {
00072 OSDOUBLE dfltval;
00073 OSFLOAT fltval;
00074 OSINT32 i32val;
00075 OSUINT32 ui32val;
00076 #if !defined(_NO_INT64_SUPPORT)
00077 OSINT64 i64val;
00078 OSUINT64 ui64val;
00079 #endif
00080 } u;
00081
00082 struct OSRTScalarDListNode* next;
00083 struct OSRTScalarDListNode* prev;
00084 } OSRTScalarDListNode;
00085
00092 typedef struct OSRTScalarDList {
00093 OSUINT32 count;
00094 OSRTScalarDListNode* head;
00095 OSRTScalarDListNode* tail;
00096 } OSRTScalarDList;
00097
00106 EXTERNRT void rtxScalarDListInit (OSRTScalarDList* pList);
00107
00123 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendDouble
00124 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSDOUBLE value);
00125
00126 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendFloat
00127 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSFLOAT value);
00128
00129 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendInt32
00130 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSINT32 value);
00131
00132 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendUInt32
00133 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSUINT32 value);
00134
00135 #if !defined(_NO_INT64_SUPPORT)
00136 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendInt64
00137 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSINT64 value);
00138
00139 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendUInt64
00140 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSUINT64 value);
00141 #endif
00142
00158 EXTERNRT OSRTScalarDListNode* rtxScalarDListAppendNode
00159 (OSRTScalarDList* pList, OSRTScalarDListNode* pListNode);
00160
00176 EXTERNRT OSRTScalarDListNode* rtxScalarDListInsertNode
00177 (OSRTScalarDList* pList, OSUINT32 idx, OSRTScalarDListNode* pListNode);
00178
00192 EXTERNRT OSRTScalarDListNode*
00193 rtxScalarDListFindByIndex (const OSRTScalarDList* pList, OSUINT32 idx);
00194
00204 EXTERNRT void rtxScalarDListFreeNode
00205 (struct OSCTXT* pctxt, OSRTScalarDList* pList, OSRTScalarDListNode* node);
00206
00213 EXTERNRT void rtxScalarDListRemove
00214 (OSRTScalarDList* pList, OSRTScalarDListNode* node);
00215
00223 EXTERNRT void rtxScalarDListFreeNodes
00224 (struct OSCTXT* pctxt, OSRTScalarDList* pList);
00225
00226 #ifdef __cplusplus
00227 }
00228 #endif
00229
00232 #endif