XBinder  Version 2.9.x
rtxEnum.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2022 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  *****************************************************************************/
29 #ifndef _RTXENUM_H_
30 #define _RTXENUM_H_
31 
32 #include "rtxsrc/rtxContext.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
44 typedef struct OSEnumItem {
45  const OSUTF8CHAR* name;
46  OSINT32 value;
47  OSUINT16 namelen;
48  OSUINT16 transidx;
49 } OSEnumItem;
50 
51 typedef struct OSEnumItemU32 {
52  const OSUTF8CHAR* name;
53  OSUINT32 value;
54  OSUINT16 namelen;
55  OSUINT16 transidx;
56 } OSEnumItemU32;
57 
58 typedef struct OSBigEnumItem {
59  const OSUTF8CHAR* name;
60  const char* value;
61  OSUINT16 namelen;
62  OSUINT16 transidx;
63 } OSBigEnumItem;
64 
65 typedef struct OSNumericEnumItem {
66  OSINT32 start;
67  OSINT32 end;
68 } OSNumericEnumItem;
69 
70 typedef struct OSNumericEnumItemU32 {
71  OSUINT32 start;
72  OSUINT32 end;
73 } OSNumericEnumItemU32;
74 
75 typedef struct OSNumericEnumItem64 {
76  OSINT64 start;
77  OSINT64 end;
78 } OSNumericEnumItem64;
79 
80 typedef struct OSNumericEnumItemU64 {
81  OSUINT64 start;
82  OSUINT64 end;
83 } OSNumericEnumItemU64;
84 
96 EXTERNRT OSINT32 rtxLookupEnum
97 (const OSUTF8CHAR* strValue, size_t strValueSize,
98  const OSEnumItem enumTable[], OSUINT16 enumTableSize);
99 
111 EXTERNRT OSINT32 rtxLookupEnumU32
112 (const OSUTF8CHAR* strValue, size_t strValueSize,
113  const OSEnumItemU32 enumTable[], OSUINT16 enumTableSize);
114 
127 EXTERNRT OSINT32 rtxLookupBigEnum
128 (const OSUTF8CHAR* strValue, size_t strValueSize,
129  const OSBigEnumItem enumTable[], OSUINT16 enumTableSize);
130 
141 EXTERNRT OSINT32 rtxLookupEnumByValue
142 (OSINT32 value, const OSEnumItem enumTable[], size_t enumTableSize);
143 
154 EXTERNRT OSINT32 rtxLookupEnumU32ByValue
155 (OSUINT32 value, const OSEnumItemU32 enumTable[], size_t enumTableSize);
156 
167 EXTERNRT OSINT32 rtxLookupBigEnumByValue
168 (const char* value, const OSBigEnumItem enumTable[], size_t enumTableSize);
169 
179 EXTERNRT int rtxTestNumericEnum
180 (OSINT32 ivalue, const OSNumericEnumItem enumTable[], OSUINT16 enumTableSize);
181 
182 EXTERNRT int rtxTestNumericEnumU32
183 (OSUINT32 ivalue, const OSNumericEnumItemU32 enumTable[], OSUINT16 enumTableSize);
184 
185 EXTERNRT int rtxTestNumericEnum64
186 (OSINT64 ivalue, const OSNumericEnumItem64 enumTable[], OSUINT16 enumTableSize);
187 
188 EXTERNRT int rtxTestNumericEnumU64
189 (OSUINT64 ivalue, const OSNumericEnumItemU64 enumTable[], OSUINT16 enumTableSize);
193 #ifdef __cplusplus
194 }
195 #endif
196 
197 #endif
EXTERNRT OSINT32 rtxLookupEnumU32(const OSUTF8CHAR *strValue, size_t strValueSize, const OSEnumItemU32 enumTable[], OSUINT16 enumTableSize)
This function will return the numeric value for the given enumerated identifier string.
EXTERNRT OSINT32 rtxLookupBigEnumByValue(const char *value, const OSBigEnumItem enumTable[], size_t enumTableSize)
Lookup enum by stringified version of value.
EXTERNRT OSINT32 rtxLookupEnumByValue(OSINT32 value, const OSEnumItem enumTable[], size_t enumTableSize)
Lookup enum by integer value.
EXTERNRT int rtxTestNumericEnum(OSINT32 ivalue, const OSNumericEnumItem enumTable[], OSUINT16 enumTableSize)
This function determines if the given numeric enumerated value is within the defined numeration set...
EXTERNRT OSINT32 rtxLookupBigEnum(const OSUTF8CHAR *strValue, size_t strValueSize, const OSBigEnumItem enumTable[], OSUINT16 enumTableSize)
This function will return the numeric value for the given enumerated identifier string.
Common run-time context definitions.
EXTERNRT OSINT32 rtxLookupEnum(const OSUTF8CHAR *strValue, size_t strValueSize, const OSEnumItem enumTable[], OSUINT16 enumTableSize)
This function will return the numeric value for the given enumerated identifier string.
EXTERNRT OSINT32 rtxLookupEnumU32ByValue(OSUINT32 value, const OSEnumItemU32 enumTable[], size_t enumTableSize)
Lookup enum by integer value (Unsiged 32-bit integer).