ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/gr2lib/trunk/gr2lib/CoreTypes.cs
(Generate patch)

Comparing trunk/gr2lib/CoreTypes.cs (file contents):
Revision 12 by william, Wed Jul 14 06:19:08 2010 UTC vs.
Revision 13 by william, Wed Jul 14 09:21:14 2010 UTC

# Line 2 | Line 2
2   using System.Collections.Generic;
3   using System.Text;
4  
5 + using gr2lib.core.typedefs;
6  
7 < namespace gr2lib
7 > namespace gr2lib.core.coretypes
8   {
9 <    namespace core
9 >  
10 >
11 >    #region struct granny_file
12 >    /// <summary>
13 >    /// granny_file: update
14 >    /// </summary>
15 >    public struct granny_file
16      {
10        namespace coretypes
11        {
12            #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            {
17   #pragma warning disable 0169
18 <                bool IsByteReversed;
19 <                unsafe granny_grn_file_header* Header;
20 <                unsafe granny_grn_file_magic_value* SourceMagicValue;
21 <                granny_int32x SectionCount;
22 <                unsafe void** Sections;
23 <                unsafe bool* Marshalled;
24 <                unsafe bool* IsUserMemory;
25 <                unsafe void* ConversionBuffer;
18 >        bool IsByteReversed;
19 >        unsafe granny_grn_file_header* Header;
20 >        unsafe granny_grn_file_magic_value* SourceMagicValue;
21 >        granny_int32x SectionCount;
22 >        unsafe void** Sections;
23 >        unsafe bool* Marshalled;
24 >        unsafe bool* IsUserMemory;
25 >        unsafe void* ConversionBuffer;
26   #pragma warning restore 0169
27 <            };
28 <            #endregion
27 >    };
28 >    #endregion
29  
30 <            #region struct granny_grn_reference
31 <            /// <summary>
32 <            /// granny_grn_reference: update
33 <            /// </summary>
34 <            public struct granny_grn_reference
35 <            {
30 >    #region struct granny_grn_reference
31 >    /// <summary>
32 >    /// granny_grn_reference: update
33 >    /// </summary>
34 >    public struct granny_grn_reference
35 >    {
36   #pragma warning disable 0169
37 <                granny_uint32 SectionIndex;
38 <                granny_uint32 Offset;
37 >        granny_uint32 SectionIndex;
38 >        granny_uint32 Offset;
39   #pragma warning restore 0169
40 <            };// GrannyAlignAttribute;
41 <            #endregion
40 >    };// GrannyAlignAttribute;
41 >    #endregion
42  
43 <            #region struct granny_grn_file_header
44 <            /// <summary>
45 <            /// granny_grn_file_header: update
46 <            /// </summary>
47 <            public struct granny_grn_file_header
48 <            {
43 >    #region struct granny_grn_file_header
44 >    /// <summary>
45 >    /// granny_grn_file_header: update
46 >    /// </summary>
47 >    public struct granny_grn_file_header
48 >    {
49 >        //public granny_grn_file_header()
50 >        //{
51 >        //    ExtraTags = new granny_uint32[GrannyGRNExtraTagCount];
52 >        //    ReservedUnused = granny_uint32[3];
53 >        //}
54   #pragma warning disable 0169
55 <                granny_uint32 Version;
56 <                granny_uint32 TotalSize;
57 <                granny_uint32 CRC;
58 <                granny_uint32 SectionArrayOffset;
59 <                granny_uint32 SectionArrayCount;
60 <                granny_grn_reference RootObjectTypeDefinition;
61 <                granny_grn_reference RootObject;
62 <                granny_uint32 TypeTag;
63 <                private const int GrannyGRNExtraTagCount = 4;
64 <                unsafe fixed granny_uint32 ExtraTags[GrannyGRNExtraTagCount];
65 <                granny_uint32 StringDatabaseCRC;
66 <                unsafe fixed granny_uint32 ReservedUnused[3];
55 >        granny_uint32 Version;
56 >        granny_uint32 TotalSize;
57 >        granny_uint32 CRC;
58 >        granny_uint32 SectionArrayOffset;
59 >        granny_uint32 SectionArrayCount;
60 >        granny_grn_reference RootObjectTypeDefinition;
61 >        granny_grn_reference RootObject;
62 >        granny_uint32 TypeTag;
63 >        private const int GrannyGRNExtraTagCount = 4;
64 >        unsafe granny_uint32* ExtraTags;
65 >        granny_uint32 StringDatabaseCRC;
66 >        unsafe granny_uint32* ReservedUnused;
67   #pragma warning restore 0169
68 <            };// GrannyAlignAttribute;
69 <            #endregion
68 >    };// GrannyAlignAttribute;
69 >    #endregion
70  
71 <            #region struct granny_grn_file_magic_value
72 <            /// <summary>
73 <            /// granny_grn_file_magic_value: update
74 <            /// </summary>
75 <            public struct granny_grn_file_magic_value
76 <            {
71 >    #region struct granny_grn_file_magic_value
72 >    /// <summary>
73 >    /// granny_grn_file_magic_value: update
74 >    /// </summary>
75 >    public struct granny_grn_file_magic_value
76 >    {
77 >        //static granny_grn_file_magic_value()
78 >        //{
79 >        //    MagicValue = granny_uint32[4];
80 >        //    Reserved = granny_uint32[2];
81 >        //}
82   #pragma warning disable 0169
83 <                unsafe fixed granny_uint32 MagicValue[4];
84 <                granny_uint32 HeaderSize;
85 <                granny_uint32 HeaderFormat;
86 <                unsafe fixed granny_uint32 Reserved[2];
83 >        unsafe granny_uint32* MagicValue;
84 >        granny_uint32 HeaderSize;
85 >        granny_uint32 HeaderFormat;
86 >        unsafe granny_uint32* Reserved;
87   #pragma warning restore 0169
88 <            };// GrannyAlignAttribute;
89 <            #endregion
114 <        }
115 <    }
88 >    };// GrannyAlignAttribute;
89 >    #endregion
90   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines