Skip to content

Commit

Permalink
more cleanup/renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Meisrimel authored and Peter Meisrimel committed Aug 7, 2024
1 parent 01322b3 commit c687dba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/XML/src/FMI3/fmi3_xml_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ static jm_string fmi3_xml_get_xml_attr_name(fmi3_xml_parser_context_t* context,
* EXPAND_ELM_SCHEME(Float64) -> fmi3_xml_scheme_Float64 -> {fmi3_xml_elmID_SimpleType, fmi3_xml_elmID_TypeDefinitions, 0, 1}
*/
#define EXPAND_ELM_SCHEME(elm) fmi3_xml_scheme_##elm ,

/* Global array of all modelDescription scheme_info_t. Index it with fmi3_xml_elm_modelDescription_enu_t entries. */
const fmi3_xml_scheme_modelDescription_info_t fmi3_xml_scheme_modelDescription_info[fmi3_xml_elm_number] = {
FMI3_XML_ELMLIST_MODEL_DESCR(EXPAND_ELM_SCHEME)
Expand All @@ -78,7 +77,7 @@ const fmi3_xml_scheme_modelDescription_info_t fmi3_xml_scheme_modelDescription_i
};

#define EXPAND_ELM_SCHEME_TERMICON(elm) fmi_xml_scheme_termIcon_##elm ,
/* Global array of all termIcon scheme_info_t. Index it with fmi_xml_elm_termIcon_enu_t entries. */
/* Global array of all terminalsAndIcons scheme_info_t. Index it with fmi_xml_elm_termIcon_enu_t entries. */
fmi_xml_scheme_termIcon_info_t fmi_xml_scheme_termIcon_info[fmi_xml_elm_termIcon_number] = {
FMI_XML_ELMLIST_TERM_ICON(EXPAND_ELM_SCHEME_TERMICON)
{fmi_xml_elm_termIcon_actual_number, 0, 0},
Expand Down
8 changes: 4 additions & 4 deletions src/XML/src/FMI3/fmi3_xml_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ jm_vector_declare_template(fmi3_value_reference_t)
multiple elements of this type are allowed in a sequence.
*/
typedef struct {
fmi3_xml_elm_modelDescription_enu_t superID; /* ID of super type or NULL if none */
fmi3_xml_elm_modelDescription_enu_t superID; /* ID of super type or NULL if none */
fmi3_xml_elm_modelDescription_enu_t parentID; /* expected parent ID for an element */
int siblingIndex; /* index among siblings */
int multipleAllowed; /* multiple elements of this kind kan come in a sequence as siblings*/
} fmi3_xml_scheme_modelDescription_info_t;

typedef struct {
fmi_xml_elm_termIcon_enu_t superID; /* ID of super type or NULL if none */
fmi_xml_elm_termIcon_enu_t superID; /* ID of super type or NULL if none */
fmi_xml_elm_termIcon_enu_t parentID; /* expected parent ID for an element */
int siblingIndex; /* index among siblings */
int multipleAllowed; /* multiple elements of this kind kan come in a sequence as siblings*/
} fmi_xml_scheme_termIcon_info_t;

typedef struct {
fmi3_xml_elm_t superID; /* ID of super type or NULL if none */
fmi3_xml_elm_t superID; /* ID of super type or NULL if none */
fmi3_xml_elm_t parentID; /* expected parent ID for an element */
int siblingIndex; /* index among siblings */
int multipleAllowed; /* multiple elements of this kind kan come in a sequence as siblings*/
Expand Down Expand Up @@ -124,7 +124,7 @@ int fmi3_xml_parse_attr_valueref_list(fmi3_xml_parser_context_t* context, fmi3_x

int fmi3_xml_is_attr_defined( fmi3_xml_parser_context_t* context, const fmi3_xml_attr_t attrID);
jm_string fmi3_xml_peek_attr_str(fmi3_xml_parser_context_t* context, const fmi3_xml_attr_t attrID);
int fmi3_xml_get_attr_str(fmi3_xml_parser_context_t* context, fmi3_xml_elm_t elmID, const fmi3_xml_attr_t attrID, int required,const char** valp);
int fmi3_xml_get_attr_str(fmi3_xml_parser_context_t* context, fmi3_xml_elm_t elmID, const fmi3_xml_attr_t attrID, int required, const char** valp);

void fmi3_xml_set_element_handle(fmi3_xml_parser_context_t* context, const char* elm, fmi3_xml_elm_t id);

Expand Down
6 changes: 3 additions & 3 deletions src/XML/src/FMI3/fmi3_xml_parser_scheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ FMI3_XML_ELMLIST_MODEL_DESCR (EXPAND_ELM_HANDLE_FMI3)
FMI3_XML_ELMLIST_ALT_MODEL_DESCR (EXPAND_ELM_HANDLE_FMI3)
FMI3_XML_ELMLIST_ABSTRACT_MODEL_DESCR(EXPAND_ELM_HANDLE_FMI3)

#define EXPAND_ELM_HANDLE_FMI_TERM_ICON(elm) extern int fmi_xml_handle_##elm(fmi3_xml_parser_context_t* context, const char* data);
FMI_XML_ELMLIST_TERM_ICON (EXPAND_ELM_HANDLE_FMI_TERM_ICON)
FMI_XML_ELMLIST_ALT_TERM_ICON(EXPAND_ELM_HANDLE_FMI_TERM_ICON)
#define EXPAND_ELM_HANDLE_FMI_TERMICON(elm) extern int fmi_xml_handle_##elm(fmi3_xml_parser_context_t* context, const char* data);
FMI_XML_ELMLIST_TERM_ICON (EXPAND_ELM_HANDLE_FMI_TERMICON)
FMI_XML_ELMLIST_ALT_TERM_ICON(EXPAND_ELM_HANDLE_FMI_TERMICON)

/**
* Create an enum over all modelDescription XML elements. This enum can be used to index
Expand Down

0 comments on commit c687dba

Please sign in to comment.