ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/gr2lib/trunk/gr2lib/CoreTypes.cs
Revision: 8
Committed: Wed Jul 14 06:19:08 2010 UTC (13 years, 2 months ago) by william
File size: 4266 byte(s)
Log Message:
** define typedefs
** define initial structs

File Contents

# User Rev Content
1 william 6 using System;
2     using System.Collections.Generic;
3     using System.Text;
4    
5 william 8
6 william 6 namespace gr2lib
7     {
8     namespace core
9     {
10     namespace coretypes
11     {
12 william 8 #region typedefs
13     using granny_uint32 = System.UInt32;
14     using granny_uint16 = System.UInt16;
15     using granny_uint8 = System.Byte;
16    
17     using granny_int32 = System.Int32;
18     using granny_int16 = System.Int16;
19     using granny_int8 = System.SByte;
20    
21     using granny_bool32 = System.Int32;
22     using granny_real32 = System.Single;
23    
24     using granny_real16 = System.UInt16;
25     using granny_uint32x = System.UInt32;
26     using granny_uint16x = System.UInt32;
27     using granny_uint8x = System.UInt32;
28    
29     using granny_int32x = System.Int32;
30     using granny_int16x = System.Int32;
31     using granny_int8x = System.Int32;
32     using granny_bool32x = System.Int32;
33    
34     using granny_real64x = System.Double;
35    
36     using granny_real32x = System.Single;
37    
38     using granny_triple = System.Single;//[3]; // declare type -> unsafe fixed
39     using granny_quad = System.Single;//[4]; // declare type -> unsafe fixed
40     using granny_matrix_3x3 = System.Single;//[3][3]; // declare type -> unsafe fixed
41     using granny_matrix_4x4 = System.Single;//[4][4]; // declare type -> unsafe fixed
42     using granny_matrix_3x4 = System.Single;//[3][4]; // declare type -> unsafe fixed
43     #endregion
44    
45     #region struct granny_file
46     /// <summary>
47     /// granny_file: update
48     /// </summary>
49     public struct granny_file
50     {
51     #pragma warning disable 0169
52     bool IsByteReversed;
53     unsafe granny_grn_file_header* Header;
54     unsafe granny_grn_file_magic_value* SourceMagicValue;
55     granny_int32x SectionCount;
56     unsafe void** Sections;
57     unsafe bool* Marshalled;
58     unsafe bool* IsUserMemory;
59     unsafe void* ConversionBuffer;
60     #pragma warning restore 0169
61     };
62     #endregion
63    
64     #region struct granny_grn_reference
65     /// <summary>
66     /// granny_grn_reference: update
67     /// </summary>
68     public struct granny_grn_reference
69     {
70     #pragma warning disable 0169
71     granny_uint32 SectionIndex;
72     granny_uint32 Offset;
73     #pragma warning restore 0169
74     };// GrannyAlignAttribute;
75     #endregion
76    
77     #region struct granny_grn_file_header
78     /// <summary>
79     /// granny_grn_file_header: update
80     /// </summary>
81     public struct granny_grn_file_header
82     {
83     #pragma warning disable 0169
84     granny_uint32 Version;
85     granny_uint32 TotalSize;
86     granny_uint32 CRC;
87     granny_uint32 SectionArrayOffset;
88     granny_uint32 SectionArrayCount;
89     granny_grn_reference RootObjectTypeDefinition;
90     granny_grn_reference RootObject;
91     granny_uint32 TypeTag;
92     private const int GrannyGRNExtraTagCount = 4;
93     unsafe fixed granny_uint32 ExtraTags[GrannyGRNExtraTagCount];
94     granny_uint32 StringDatabaseCRC;
95     unsafe fixed granny_uint32 ReservedUnused[3];
96     #pragma warning restore 0169
97     };// GrannyAlignAttribute;
98     #endregion
99    
100     #region struct granny_grn_file_magic_value
101     /// <summary>
102     /// granny_grn_file_magic_value: update
103     /// </summary>
104     public struct granny_grn_file_magic_value
105     {
106     #pragma warning disable 0169
107     unsafe fixed granny_uint32 MagicValue[4];
108     granny_uint32 HeaderSize;
109     granny_uint32 HeaderFormat;
110     unsafe fixed granny_uint32 Reserved[2];
111     #pragma warning restore 0169
112     };// GrannyAlignAttribute;
113     #endregion
114 william 6 }
115     }
116     }