rtxScalarDList.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2003-2010 Objective Systems, Inc.
00003  *
00004  * This software is furnished under a license and may be used and copied
00005  * only in accordance with the terms of such license and with the
00006  * inclusion of the above copyright notice. This software or any other
00007  * copies thereof may not be provided or otherwise made available to any
00008  * other person. No title to and ownership of the software is hereby
00009  * transferred.
00010  *
00011  * The information in this software is subject to change without notice
00012  * and should not be construed as a commitment by Objective Systems, Inc.
00013  *
00014  * PROPRIETARY NOTICE
00015  *
00016  * This software is an unpublished work subject to a confidentiality agreement
00017  * and is protected by copyright and trade secret law.  Unauthorized copying,
00018  * redistribution or other use of this work is prohibited.
00019  *
00020  * The above notice of copyright on this source code product does not indicate
00021  * any actual or intended publication of such source code.
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 /* Kept externally to avoid breakage on intolerant compilers like aCC. */
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 index, OSRTScalarDListNode* pListNode);
00178 
00192 EXTERNRT OSRTScalarDListNode*
00193 rtxScalarDListFindByIndex (const OSRTScalarDList* pList, OSUINT32 index);
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