datadef.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 // This file is included by both .h/cpp and .r files
11 // ------------------------------------------------------------
12 #include "rtypes.r.h"
13 
14 /*----------------------------------------------------------------------+
15 | |
16 | Defines |
17 | |
18 +----------------------------------------------------------------------*/
19 /* Data Types */
20 #define DTYPE_CHAR 1
21 #define DTYPE_SHORT 2
22 #define DTYPE_LONG 3
23 #define DTYPE_DOUBLE 4
24 #define DTYPE_ARRAY 5
25 #define DTYPE_VOID 6 /* needs special handling */
26 #define DTYPE_STRUCT 7
27 #define DTYPE_ENDSTRUCT 8
28 #define DTYPE_LONG64 9
29 
30 /* Attributes - Must match rows/columns of oper conversion tables */
31 #define ATTR_S_LE 0 /* Little Endian Short */
32 #define ATTR_S_BE 1 /* Big Endian Short */
33 #define ATTR_L_LE 0 /* Little Endian Long */
34 #define ATTR_L_ME 1 /* Middle Endian Long (PDP Long) */
35 #define ATTR_L_BE 2 /* Big Endian */
36 
37 #define ATTR_D_LE 0 /* IEEE Double - Little Endian */
38 #define ATTR_D_BE 1 /* IEEE Double - Big Endian */
39 #define ATTR_D_VD 2 /* VAX Double-precision floating point */
40 
41 #define ARRAYMEM ( 1 )
42 #define FIRSTMEM ( 1 << 1 )
43 #define S_ALIGN(a) ( a << 2 )
44 
45 /*----------------------------------------------------------------------+
46 | |
47 | Typedefs |
48 | |
49 +----------------------------------------------------------------------*/
50 #if defined (resource)
51 
52 #pragma pushDataProps /* Save current data properties. */
53 #pragma packedLittleEndianData
54 
55 typedef unsigned long DataSize;
56 
57 resourceclass DataSize RTYPE_DataSize;
58 
59 typedef struct datadef
60  {
61  unsigned long dataType;
62  unsigned long externalAlignment;
63  unsigned long attrs1;
64  unsigned long attrs2;
65  } DataDef;
66 
67 typedef DataDef DataDefBlock [];
68 resourceclass DataDefBlock RTYPE_DataDefBlock;
69 
70 #define DATADEF_SIZE sizeof(DataDef)
71 
72 #pragma popDataProps /* Restore current data properties. */
73 
74 #else
75 #define DATADEF_SIZE (4*sizeof(unsigned long))
76 
77 #endif /* defined (resource) */
#define RTYPE_DataSize
Definition: RmgrTools/Tools/rtypes.r.h:30
#define RTYPE_DataDefBlock
Definition: RmgrTools/Tools/rtypes.r.h:29

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