Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TagBlockDefinition"/> using the supplied guerilla reader.
        /// </summary>
        /// <param name="reader">The guerilla binary reader.</param>
        internal TagBlockDefinition(H2Guerilla.GuerillaBinaryReader reader) : this()
        {
            //Read tag block definition
            H2Guerilla.TagBlockDefinition tagBlockDefinition = reader.ReadTagBlockDefinition();

            //Initialize
            flags = tagBlockDefinition.Flags;
            maximumElementCount   = tagBlockDefinition.MaximumElementCount;
            fieldSetsAddress      = tagBlockDefinition.FieldSetsAddress;
            fieldSetCount         = tagBlockDefinition.FieldSetCount;
            fieldSetLatestAddress = tagBlockDefinition.FieldSetLatestAddress;
            displayName           = reader.ReadLocalizedString(tagBlockDefinition.DisplayNameAddress);
            name = reader.ReadLocalizedString(tagBlockDefinition.NameAddress);
            maximumElementCountString = reader.ReadLocalizedString(tagBlockDefinition.MaximumElementCountStringAddress);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TagGroupDefinition"/> class using the supplied guerilla reader.
        /// </summary>
        /// <param name="reader">The guerilla binary reader.</param>
        internal TagGroupDefinition(H2Guerilla.GuerillaBinaryReader reader) : this()
        {
            //Read tag group
            H2Guerilla.TagGroup tagGroup = reader.ReadTagGroup();

            //Setup
            flags             = tagGroup.Flags;
            groupTag          = tagGroup.GroupTag;
            parentGroupTag    = tagGroup.ParentGroupTag;
            version           = tagGroup.Version;
            initialized       = tagGroup.Initialized;
            definitionAddress = tagGroup.DefinitionAddress;
            childGroupTags    = tagGroup.ChildGroupTags;
            childsCount       = tagGroup.ChildsCount;
            defaultTagPath    = reader.ReadLocalizedString(tagGroup.DefaultTagPathAddress);
            name = reader.ReadLocalizedString(tagGroup.NameAddress);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Reads the field set using the supplied guerilla binary reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        internal void Read(H2Guerilla.GuerillaBinaryReader reader)
        {
            var fieldSet = reader.ReadTagFieldSet();

            version            = new FieldSetVersion(fieldSet.Version);
            size               = fieldSet.Size;
            alignmentBit       = fieldSet.AlignmentBit;
            parentVersionIndex = fieldSet.ParentVersionIndex;
            fieldsAddress      = fieldSet.FieldsAddress;
            address            = fieldSet.Address;
            sizeString         = reader.ReadLocalizedString(fieldSet.SizeStringAddress);
        }