rtxEnum.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  *****************************************************************************/
00029 #ifndef _RTXENUM_H_
00030 #define _RTXENUM_H_
00031 
00032 #include "rtxsrc/rtxContext.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00044 typedef struct OSEnumItem {
00045    const OSUTF8CHAR* name;
00046    OSINT32           value;
00047    OSUINT16          namelen;
00048    OSUINT16          transidx;
00049 } OSEnumItem;
00050 
00051 typedef struct OSNumericEnumItem {
00052    OSINT32           start;
00053    OSINT32           end;
00054 } OSNumericEnumItem;
00055 
00056 typedef struct OSNumericEnumItemU32 {
00057    OSUINT32           start;
00058    OSUINT32           end;
00059 } OSNumericEnumItemU32;
00060 
00061 typedef struct OSNumericEnumItem64 {
00062    OSINT64           start;
00063    OSINT64           end;
00064 } OSNumericEnumItem64;
00065 
00066 typedef struct OSNumericEnumItemU64 {
00067    OSUINT64           start;
00068    OSUINT64           end;
00069 } OSNumericEnumItemU64;
00070 
00082 EXTERNRT OSINT32 rtxLookupEnum
00083 (const OSUTF8CHAR* strValue, size_t strValueSize,
00084  const OSEnumItem enumTable[], OSUINT16 enumTableSize);
00085 
00096 EXTERNRT OSINT32 rtxLookupEnumByValue
00097 (OSINT32 value, const OSEnumItem enumTable[], size_t enumTableSize);
00098 
00108 EXTERNRT int rtxTestNumericEnum
00109 (OSINT32 ivalue, const OSNumericEnumItem enumTable[], OSUINT16 enumTableSize);
00110 
00111 EXTERNRT int rtxTestNumericEnumU32
00112 (OSUINT32 ivalue, const OSNumericEnumItemU32 enumTable[], OSUINT16 enumTableSize);
00113 
00114 EXTERNRT int rtxTestNumericEnum64
00115 (OSINT64 ivalue, const OSNumericEnumItem64 enumTable[], OSUINT16 enumTableSize);
00116 
00117 EXTERNRT int rtxTestNumericEnumU64
00118 (OSUINT64 ivalue, const OSNumericEnumItemU64 enumTable[], OSUINT16 enumTableSize);
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 
00126 #endif