cexprrsc.r.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include "rscdefs.r.h"
11 
12 // ------------------------------------------------------------
13 // This file is included by both .h/cpp and .r files
14 // ------------------------------------------------------------
15 
16 /*----------------------------------------------------------------------+
17 | |
18 | Defines |
19 | |
20 +----------------------------------------------------------------------*/
21 
22 #if defined (resource)
23 #define VARIABLE_SIZE
24 #else
25 #define VARIABLE_SIZE 1
26 #endif
27 
28 /* Bit masks for the typeInfo field in the cexprMember structure */
29 #define CTYPE_PACKED 0x80000000 /* Resource definition not used */
30 #define CTYPE_RESOURCE_ID 0x7FFFFFFF /* Resource ID of type def */
31 #define CTYPE_CODE 0xFF /* Type code if not resource ID */
32 #define CTYPE_WIDTH_MASK 0xFF00 /* Field width for bit fields */
33 #define CTYPE_WIDTH_SHIFT 8
34 #define CTYPE_SHIFT_MASK 0xFF0000 /* Shift count for bit fields */
35 #define CTYPE_SHIFT_SHIFT 16
36 #define CTYPE_POINTER 0x40000000 /* Pointer to base type */
37 #define CTYPE_COUNT_MASK 0x0FFFFF00 /* If pointer, repeat count.
38  Non-zero => array */
39 #define CTYPE_COUNT_SHIFT 8
40 
41 /* Bit masks for the nameSum field in the cexprMember structure */
42 #define MEMBER_NAMESUM_DUP 0x80000000 /* If set, nameSum is not unique
43  almong struct members */
44 #define MEMBER_NAMESUM_VALUE 0x7FFFFFFF /* Actual value of nameSum */
45 
46 
47 /*----------------------------------------------------------------------+
48 | |
49 | Typedefs |
50 | |
51 +----------------------------------------------------------------------*/
52 
53 typedef struct cexprType
54  {
55  short tcode; /* STRUCT, UNION, etc. */
56  unsigned long size; /* Total type size */
57  unsigned long detail; /* 0, resource ID of madeof, or
58  CEXPR_TYPE_ definitions */
59  unsigned long name; /* Name if STRUCT or UNION */
60  unsigned long tnumber; /* Count of fields if array. Field
61  width if bit field. */
62  } CexprType;
63 
64 #if defined (resource)
65 resourceclass CexprType RTYPE_CTYPE;
66 #endif
67 
68 /* Used for structures and unions */
69 typedef struct cexprStructName
70  {
71  unsigned long typeID;
72  unsigned long nameID;
73  unsigned long nameSum;
75 
76 /* Count of named unions and structures. */
77 typedef struct cexprNamedStructures
78  {
79 #if !defined (resource)
81 #endif
84 
85 #if defined (resource)
87 #endif
88 
89 /* Used for structure members */
90 typedef struct cexprMember
91  {
92  unsigned long typeInfo; /* See the CTYPE_... bits masks */
93  unsigned long offset;
94  unsigned long nameID;
95  unsigned long nameSum; /* Most significant bit off => unique */
96  } CexprMember;
97 
98 typedef struct cexprMemberList
99  {
100 #if !defined (resource)
102 #endif
104  } CexprMemberList;
105 
106 #if defined (resource)
107 resourceclass CexprMemberList RTYPE_CMEMBER;
108 #endif
109 
110 typedef struct cexprName
111  {
112 #if !defined (resource)
113  int size;
114 #endif
115  char name [VARIABLE_SIZE]; // CHAR_OK - Persistence
116  } CexprName;
117 
118 #if defined (resource)
119 resourceclass CexprName RTYPE_CNAME;
120 #endif
struct cexprMember CexprMember
unsigned long offset
Definition: cexprrsc.r.h:93
unsigned long typeID
Definition: cexprrsc.r.h:71
unsigned long nameSum
Definition: cexprrsc.r.h:95
Definition: cexprrsc.r.h:69
Definition: cexprrsc.r.h:98
#define VARIABLE_SIZE
Definition: cexprrsc.r.h:25
Definition: cexprrsc.r.h:110
unsigned long nameID
Definition: cexprrsc.r.h:72
#define RTYPE_CMEMBER
Definition: Mstn/MdlApi/rtypes.r.h:51
char name[1]
Definition: cexprrsc.r.h:115
unsigned long detail
Definition: cexprrsc.r.h:57
#define RTYPE_CNAME
Definition: Mstn/MdlApi/rtypes.r.h:52
unsigned long nameSum
Definition: cexprrsc.r.h:73
unsigned long name
Definition: cexprrsc.r.h:59
unsigned long typeInfo
Definition: cexprrsc.r.h:92
Definition: cexprrsc.r.h:90
CexprStructName structs[1]
Definition: cexprrsc.r.h:82
short tcode
Definition: cexprrsc.r.h:55
int structCount
Definition: cexprrsc.r.h:80
CexprMember members[1]
Definition: cexprrsc.r.h:103
struct cexprStructName CexprStructName
struct cexprType CexprType
#define RTYPE_CTYPE
Definition: Mstn/MdlApi/rtypes.r.h:54
unsigned long tnumber
Definition: cexprrsc.r.h:60
unsigned long size
Definition: cexprrsc.r.h:56
int size
Definition: cexprrsc.r.h:113
struct cexprNamedStructures CexprNamedStructures
#define RTYPE_CSTRUCT_NAME
Definition: Mstn/MdlApi/rtypes.r.h:53
int numberMembers
Definition: cexprrsc.r.h:101
struct cexprMemberList CexprMemberList
Definition: cexprrsc.r.h:77
Definition: cexprrsc.r.h:53
struct cexprName CexprName
unsigned long nameID
Definition: cexprrsc.r.h:94

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.