Skip to content

Parsing enum fields with name not a number - FAST v1.2 #86

@benjaminfaul2

Description

@benjaminfaul2

Hello, I am trying to use mFAST with FAST v1.2 templates and it seems to throw a static error when an enum type has element names that are not numbers.
E.g.

<define name="Answer">
    <enum>
      <element name="N" id="No"/>
      <element name="Y" id="Yes"/>
    </enum>
  </define>

Is there a way I can fix this? I'm trying to understand the code but it just seems to assume the element names must be a number.

Error:

Throw in function virtual void mfast::xml_parser::field_builder::visit(const mfast::enum_field_instruction*, void*)
Dynamic exception type: boost::exception_detail::clone_impl<mfast::fast_static_error>
std::exception::what: std::exception
[mfast::xml_parser::tag_value*] = 0
[mfast::tag_error_code*] = Unrecognized enum initial value :

Note: I am using the latest master as of 9-Sept-2019.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions