diff --git a/src/XML/src/FMI3/fmi3_xml_model_description.c b/src/XML/src/FMI3/fmi3_xml_model_description.c index 8da690c3..906e5119 100644 --- a/src/XML/src/FMI3/fmi3_xml_model_description.c +++ b/src/XML/src/FMI3/fmi3_xml_model_description.c @@ -548,7 +548,6 @@ int fmi3_xml_handle_ModelExchange(fmi3_xml_parser_context_t *context, const char jm_log_verbose(context->callbacks, module, "Parsing XML element ModelExchange"); // Reset handles for the elements that are specific under ModelExchange - // TODO: Expand the FMI3_XML_ELM_ID macro fmi3_xml_set_element_handle(context, "SourceFiles", FMI3_ELM(FMI3_XML_ELM_ID(SourceFiles))); fmi3_xml_set_element_handle(context, "File", FMI3_ELM(FMI3_XML_ELM_ID(File))); @@ -584,7 +583,6 @@ int fmi3_xml_handle_CoSimulation(fmi3_xml_parser_context_t *context, const char* jm_log_verbose(context->callbacks, module, "Parsing XML element CoSimulation"); // Reset handles for the elements that are specific under CoSimulation - // TODO: Expand the FMI3_XML_ELM_ID macro fmi3_xml_set_element_handle(context, "SourceFiles", FMI3_ELM(FMI3_XML_ELM_ID(SourceFilesCS))); fmi3_xml_set_element_handle(context, "File", FMI3_ELM(FMI3_XML_ELM_ID(FileCS))); diff --git a/src/XML/src/FMI3/fmi3_xml_model_description_scheme.h b/src/XML/src/FMI3/fmi3_xml_model_description_scheme.h index 4cfe4245..79d0ecc4 100644 --- a/src/XML/src/FMI3/fmi3_xml_model_description_scheme.h +++ b/src/XML/src/FMI3/fmi3_xml_model_description_scheme.h @@ -183,7 +183,7 @@ extern "C" { @multi_elem: if the parent can have multiple elements of this type */ -/* scheme_ID, super_type, parent_ID, sib_idx, multi_elem */ +/* scheme_ID, super_type, parent_ID, sib_idx, multi_elem */ #define fmi3_xml_scheme_fmiModelDescription {fmi3_xml_elmID_none, fmi3_xml_elmID_none, 0, 0} #define fmi3_xml_scheme_ModelExchange {fmi3_xml_elmID_none, fmi3_xml_elmID_fmiModelDescription, 0, 0} #define fmi3_xml_scheme_SourceFiles {fmi3_xml_elmID_none, fmi3_xml_elmID_ModelExchange, 0, 0} @@ -256,9 +256,6 @@ extern "C" { // Not used except for setting up the element handler framework: #define fmi3_xml_scheme_Start {fmi3_xml_elmID_none, fmi3_xml_elmID_none, 1, 0} -// TODO: List formatting -// TODO: rename to include modelDescription in name? - #ifdef __cplusplus } #endif diff --git a/src/XML/src/FMI3/fmi3_xml_parser.c b/src/XML/src/FMI3/fmi3_xml_parser.c index 5501c0bb..4700f3f3 100644 --- a/src/XML/src/FMI3/fmi3_xml_parser.c +++ b/src/XML/src/FMI3/fmi3_xml_parser.c @@ -45,7 +45,7 @@ typedef unsigned long long int fmi3_uint_buf_t; /* same size as fmi3_int_buf_t // TODO: Move these + access functions into the parser_scheme file? #define ATTR_STR(attr) #attr, const jm_string fmi3_modelDescription_xmlAttrNames[fmi3_modelDescription_xml_attr_number] = { - FMI3_XML_ATTRLIST(ATTR_STR) + FMI3_XML_ATTRLIST_MODEL_DESCR(ATTR_STR) }; const jm_string fmi3_termIcon_xmlAttrNames[fmi3_xml_termIcon_attr_number] = { @@ -86,7 +86,6 @@ fmi3_xml_termIcon_scheme_info_t fmi_xml_scheme_termIcon_info[fmi_xml_elm_termIco }; // TODO: Move to more suitable place? -// TODO: possibly non-static static fmi3_xml_scheme_info_t fmi3_xml_get_scheme_info(fmi3_xml_parser_context_t* context, fmi3_xml_elm_t enu) { const fmi3_xml_type_t xmlType = context->xmlType; @@ -144,7 +143,6 @@ const fmi3_xml_termIcon_element_handle_map_t fmi3_termIcon_element_handle_map[fm }; // TODO: Move to more suitable place? -// TODO: possibly non-static static fmi3_xml_element_handle_map_t fmi3_xml_get_element_handle(fmi3_xml_parser_context_t* context, fmi3_xml_elm_t enu) { const fmi3_xml_type_t xmlType = context->xmlType; diff --git a/src/XML/src/FMI3/fmi3_xml_parser.h b/src/XML/src/FMI3/fmi3_xml_parser.h index 2f21f0ac..3c1ebc80 100644 --- a/src/XML/src/FMI3/fmi3_xml_parser.h +++ b/src/XML/src/FMI3/fmi3_xml_parser.h @@ -48,7 +48,6 @@ typedef struct { int multipleAllowed; /* multiple elements of this kind kan come in a sequence as siblings*/ } fmi3_xml_modelDescription_scheme_info_t; -// TODO typedef struct { 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 */ @@ -66,7 +65,6 @@ typedef struct { #define fmi3_xml_diff_elmName(a, b) strcmp(a.elementName,b.elementName) -// TODO jm_define_comp_f(fmi3_xml_compare_elmName, fmi3_xml_element_handle_map_t, fmi3_xml_diff_elmName) #define XML_BLOCK_SIZE 16000 diff --git a/src/XML/src/FMI3/fmi3_xml_parser_scheme.h b/src/XML/src/FMI3/fmi3_xml_parser_scheme.h index d3dcb77d..331be503 100644 --- a/src/XML/src/FMI3/fmi3_xml_parser_scheme.h +++ b/src/XML/src/FMI3/fmi3_xml_parser_scheme.h @@ -25,17 +25,9 @@ related to parsing XML elements and their attributes extern "C" { #endif -// TODO: Duplicate the common ones, for simplicity -/** \brief Attributes names common to modelDescription.xml & terminalsAndIcons.xml */ - -// TODO: Eliminate this list, once terminalsAndIcons has been properly separated -/** \brief Attribute names used in XML */ -#define FMI3_XML_ATTRLIST(EXPAND_XML_ATTRNAME) \ - FMI3_XML_ATTRLIST_MODEL_DESCR(EXPAND_XML_ATTRNAME) - #define FMI3_XML_ATTR_ID(attr) fmi_attr_id_##attr, typedef enum fmi3_xml_attr_modelDescription_enu_t { - FMI3_XML_ATTRLIST(FMI3_XML_ATTR_ID) + FMI3_XML_ATTRLIST_MODEL_DESCR(FMI3_XML_ATTR_ID) fmi3_modelDescription_xml_attr_number } fmi3_xml_attr_modelDescription_enu_t; diff --git a/src/XML/src/FMI3/fmi3_xml_variable.c b/src/XML/src/FMI3/fmi3_xml_variable.c index 652b615a..33d821b4 100644 --- a/src/XML/src/FMI3/fmi3_xml_variable.c +++ b/src/XML/src/FMI3/fmi3_xml_variable.c @@ -1179,7 +1179,6 @@ void fmi3_xml_free_variable(jm_callbacks* callbacks, fmi3_xml_variable_t* var) { * * The attributes are error checked. On success, the parsed variable is updated with them. */ -// TODO: These are deeply rooted in modelDescription territory; use modelDescription_elm_enu_t here? static int fmi3_xml_variable_process_attr_causality_variability_initial(fmi3_xml_parser_context_t* context, fmi3_xml_variable_t* variable, fmi3_xml_elm_t elm_id) {