--- trunk/gr2lib/CoreTypes.cs 2010/07/14 06:19:08 8
+++ trunk/gr2lib/CoreTypes.cs 2010/07/14 09:21:14 13
@@ -2,115 +2,89 @@
using System.Collections.Generic;
using System.Text;
+using gr2lib.core.typedefs;
-namespace gr2lib
+namespace gr2lib.core.coretypes
{
- namespace core
+
+
+ #region struct granny_file
+ ///
+ /// granny_file: update
+ ///
+ public struct granny_file
{
- namespace coretypes
- {
- #region typedefs
- using granny_uint32 = System.UInt32;
- using granny_uint16 = System.UInt16;
- using granny_uint8 = System.Byte;
-
- using granny_int32 = System.Int32;
- using granny_int16 = System.Int16;
- using granny_int8 = System.SByte;
-
- using granny_bool32 = System.Int32;
- using granny_real32 = System.Single;
-
- using granny_real16 = System.UInt16;
- using granny_uint32x = System.UInt32;
- using granny_uint16x = System.UInt32;
- using granny_uint8x = System.UInt32;
-
- using granny_int32x = System.Int32;
- using granny_int16x = System.Int32;
- using granny_int8x = System.Int32;
- using granny_bool32x = System.Int32;
-
- using granny_real64x = System.Double;
-
- using granny_real32x = System.Single;
-
- using granny_triple = System.Single;//[3]; // declare type -> unsafe fixed
- using granny_quad = System.Single;//[4]; // declare type -> unsafe fixed
- using granny_matrix_3x3 = System.Single;//[3][3]; // declare type -> unsafe fixed
- using granny_matrix_4x4 = System.Single;//[4][4]; // declare type -> unsafe fixed
- using granny_matrix_3x4 = System.Single;//[3][4]; // declare type -> unsafe fixed
- #endregion
-
- #region struct granny_file
- ///
- /// granny_file: update
- ///
- public struct granny_file
- {
#pragma warning disable 0169
- bool IsByteReversed;
- unsafe granny_grn_file_header* Header;
- unsafe granny_grn_file_magic_value* SourceMagicValue;
- granny_int32x SectionCount;
- unsafe void** Sections;
- unsafe bool* Marshalled;
- unsafe bool* IsUserMemory;
- unsafe void* ConversionBuffer;
+ bool IsByteReversed;
+ unsafe granny_grn_file_header* Header;
+ unsafe granny_grn_file_magic_value* SourceMagicValue;
+ granny_int32x SectionCount;
+ unsafe void** Sections;
+ unsafe bool* Marshalled;
+ unsafe bool* IsUserMemory;
+ unsafe void* ConversionBuffer;
#pragma warning restore 0169
- };
- #endregion
+ };
+ #endregion
- #region struct granny_grn_reference
- ///
- /// granny_grn_reference: update
- ///
- public struct granny_grn_reference
- {
+ #region struct granny_grn_reference
+ ///
+ /// granny_grn_reference: update
+ ///
+ public struct granny_grn_reference
+ {
#pragma warning disable 0169
- granny_uint32 SectionIndex;
- granny_uint32 Offset;
+ granny_uint32 SectionIndex;
+ granny_uint32 Offset;
#pragma warning restore 0169
- };// GrannyAlignAttribute;
- #endregion
+ };// GrannyAlignAttribute;
+ #endregion
- #region struct granny_grn_file_header
- ///
- /// granny_grn_file_header: update
- ///
- public struct granny_grn_file_header
- {
+ #region struct granny_grn_file_header
+ ///
+ /// granny_grn_file_header: update
+ ///
+ public struct granny_grn_file_header
+ {
+ //public granny_grn_file_header()
+ //{
+ // ExtraTags = new granny_uint32[GrannyGRNExtraTagCount];
+ // ReservedUnused = granny_uint32[3];
+ //}
#pragma warning disable 0169
- granny_uint32 Version;
- granny_uint32 TotalSize;
- granny_uint32 CRC;
- granny_uint32 SectionArrayOffset;
- granny_uint32 SectionArrayCount;
- granny_grn_reference RootObjectTypeDefinition;
- granny_grn_reference RootObject;
- granny_uint32 TypeTag;
- private const int GrannyGRNExtraTagCount = 4;
- unsafe fixed granny_uint32 ExtraTags[GrannyGRNExtraTagCount];
- granny_uint32 StringDatabaseCRC;
- unsafe fixed granny_uint32 ReservedUnused[3];
+ granny_uint32 Version;
+ granny_uint32 TotalSize;
+ granny_uint32 CRC;
+ granny_uint32 SectionArrayOffset;
+ granny_uint32 SectionArrayCount;
+ granny_grn_reference RootObjectTypeDefinition;
+ granny_grn_reference RootObject;
+ granny_uint32 TypeTag;
+ private const int GrannyGRNExtraTagCount = 4;
+ unsafe granny_uint32* ExtraTags;
+ granny_uint32 StringDatabaseCRC;
+ unsafe granny_uint32* ReservedUnused;
#pragma warning restore 0169
- };// GrannyAlignAttribute;
- #endregion
+ };// GrannyAlignAttribute;
+ #endregion
- #region struct granny_grn_file_magic_value
- ///
- /// granny_grn_file_magic_value: update
- ///
- public struct granny_grn_file_magic_value
- {
+ #region struct granny_grn_file_magic_value
+ ///
+ /// granny_grn_file_magic_value: update
+ ///
+ public struct granny_grn_file_magic_value
+ {
+ //static granny_grn_file_magic_value()
+ //{
+ // MagicValue = granny_uint32[4];
+ // Reserved = granny_uint32[2];
+ //}
#pragma warning disable 0169
- unsafe fixed granny_uint32 MagicValue[4];
- granny_uint32 HeaderSize;
- granny_uint32 HeaderFormat;
- unsafe fixed granny_uint32 Reserved[2];
+ unsafe granny_uint32* MagicValue;
+ granny_uint32 HeaderSize;
+ granny_uint32 HeaderFormat;
+ unsafe granny_uint32* Reserved;
#pragma warning restore 0169
- };// GrannyAlignAttribute;
- #endregion
- }
- }
+ };// GrannyAlignAttribute;
+ #endregion
}