コード例 #1
0
        private void WriteEnumElement(XmlWriter writer, enum_definition enumDefinition, ref tag_field field, int fieldOffset)
        {
            switch (field.type)
            {
            case field_type._field_byte_flags:
                WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(byte), new ActionRef <int>(IncrementFlags), true);
                break;

            case field_type._field_word_flags:
                WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(short), new ActionRef <int>(IncrementFlags), true);
                break;

            case field_type._field_long_flags:
                WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(int), new ActionRef <int>(IncrementFlags), true);
                break;

            case field_type._field_char_enum:
                WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(byte), new ActionRef <int>(IncrementEnum));
                break;

            case field_type._field_enum:
                WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(short), new ActionRef <int>(IncrementEnum));
                break;

            case field_type._field_long_enum:
                WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(int), new ActionRef <int>(IncrementEnum));
                break;
            }
        }
コード例 #2
0
        private void WriteEnumElement(XmlWriter writer, enum_definition enumDefinition, ref tag_field field, int fieldOffset)
        {
            switch (field.type)
            {
                case field_type._field_byte_flags:
                    WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(byte), new ActionRef<int>(IncrementFlags), true);
                    break;
                case field_type._field_word_flags:
                    WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(short), new ActionRef<int>(IncrementFlags), true);
                    break;
                case field_type._field_long_flags:
                    WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(int), new ActionRef<int>(IncrementFlags), true);
                    break;
                case field_type._field_char_enum:
                    WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(byte), new ActionRef<int>(IncrementEnum));
                    break;
                case field_type._field_enum:
                    WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(short), new ActionRef<int>(IncrementEnum));
                    break;
                case field_type._field_long_enum:
                    WriteEnumElement(writer, ref field, fieldOffset, enumDefinition.Options, typeof(int), new ActionRef<int>(IncrementEnum));
                    break;

            }
        }
コード例 #3
0
 public MoonfishTagEnumDefinition(enum_definition definition)
 {
     Names = definition.Options;
 }