From 05b77d78a2856e92a5eb4bec2715a1891d5b019a Mon Sep 17 00:00:00 2001 From: andre Ebersold Date: Thu, 9 Mar 2023 13:58:06 +0100 Subject: [PATCH] Added missing changes on file --- src/xml/reqif/reqif_elements_parser_root.cpp | 72 ++++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/xml/reqif/reqif_elements_parser_root.cpp b/src/xml/reqif/reqif_elements_parser_root.cpp index f320874..1b2f8f0 100644 --- a/src/xml/reqif/reqif_elements_parser_root.cpp +++ b/src/xml/reqif/reqif_elements_parser_root.cpp @@ -6,14 +6,14 @@ #include #include #include -#include -#include -#include +#include "reqif/reqif_element.h" +#include "reqif/reqif_elements_parser.h" +#include "xml/element_factory.h" -#include -#include +//#include +//#include -namespace antcc { +namespace reqif { namespace parser { @@ -22,7 +22,7 @@ namespace antcc { * Implement RootElement parsing function */ -RootElement::RootElement(antcc::antElement *_elt ) +RootElement::RootElement(reqif::Element *_elt ) : EmptyElement(_elt) { ANTCC_PARSER_DEBUG("Cplx(%0x)::Cplx ctor m_CurElt=%0x" @@ -31,7 +31,7 @@ RootElement::RootElement(antcc::antElement *_elt ) } RootElement::RootElement(const RootElement &c) - : antcc::parser::EmptyElement(c.m_CurrentElement) + : reqif::parser::EmptyElement(c.m_CurrentElement) { ANTCC_PARSER_DEBUG("Cplx(%0x)::Cplx copy c.m_CurElt=%0x" ,this @@ -61,7 +61,7 @@ void RootElement::_startElement(const std::string &ns,const std::string &name,co { State &s(m_context.back()); std::string space; - ANTCC_PARSER_DEBUG("%sCplxE(%0x)::_startElement Enter name=%s s.depth=%d context.size=%d" + ANTCC_PARSER_DEBUG("%sRootE(%0x)::_startElement Enter name=%s s.depth=%d context.size=%d" ,space.insert(0,s.m_depth,' ').c_str() ,this ,name.c_str() @@ -72,31 +72,31 @@ void RootElement::_startElement(const std::string &ns,const std::string &name,co //Should check if it's any first if (s.m_parser) { - ANTCC_PARSER_DEBUG("CplxE::_startElement call s.m_parser->_startElement : %s",name.c_str()); + ANTCC_PARSER_DEBUG("RootE::_startElement call s.m_parser->_startElement : %s",name.c_str()); s.m_parser->_startElement(ns,name,type); } else { - ANTCC_PARSER_ERROR("CplxE::_startElement no parser stacked (s.m_parser==NULL) : %s",name.c_str()); + ANTCC_PARSER_ERROR("RootE::_startElement no parser stacked (s.m_parser==NULL) : %s",name.c_str()); } } else { - ANTCC_PARSER_DEBUG("CplxE::_startElement %s call startElementImpl",name.c_str()); + ANTCC_PARSER_DEBUG("RootE::_startElement %s call startElementImpl",name.c_str()); if (!startElementImpl(ns,name,type)) { - ANTCC_PARSER_ERROR("CplxE::_startElement %s call startElementImpl returned false",name.c_str()); + ANTCC_PARSER_ERROR("RootE::_startElement %s call startElementImpl returned false",name.c_str()); #ifdef PARSER_DEBUG - std::cout<<"\tcplx _start call Any : unknown "<startAnyElement(ns,name); /* Element not recogized by us*/ } else { - ANTCC_PARSER_DEBUG("CplxE::_startElement %s called startElementImpl returned true ",name.c_str()); + ANTCC_PARSER_DEBUG("RootE::_startElement %s called startElementImpl returned true ",name.c_str()); if (s.m_parser != 0) { s.m_parser->preImpl(); /* Need to call pre */ #ifdef PARSER_DEBUG - std::cout<<"\tcplx _start Need to call pre- : "< 0) { // Indirect - ANTCC_PARSER_DEBUG("CplxE::_endElement 1 name=%s ss.m_depth=%d m_context.size=%d" + ANTCC_PARSER_DEBUG("RootE::_endElement 1 name=%s ss.m_depth=%d m_context.size=%d" ,name.c_str() ,ss.m_depth ,m_context.size()); @@ -133,20 +133,20 @@ void RootElement::_endElement(const std::string &ns,const std::string &name) } else { // Direct recursion - ANTCC_PARSER_DEBUG( "CplxE::_endElement %s 2 WARNING I pass by here Direct recursion: " + ANTCC_PARSER_DEBUG( "RootE::_endElement %s 2 WARNING I pass by here Direct recursion: " ,name.c_str()); if (this == ss.m_parser.get()) { - ANTCC_PARSER_DEBUG( "CplxE::_endElement %s good this==ss.m_parser",name.c_str()); + ANTCC_PARSER_DEBUG( "RootE::_endElement %s good this==ss.m_parser",name.c_str()); this->postImpl(); if (!endElementImpl(ns,name)) { - ANTCC_PARSER_ERROR( "CplxE::_endElement %s endElementImpl call failed",name.c_str()); + ANTCC_PARSER_ERROR( "RootE::_endElement %s endElementImpl call failed",name.c_str()); } } else { - ANTCC_PARSER_ERROR( "CplxE::_endElement %s Must NOT HAPPEN!!!",name.c_str()); + ANTCC_PARSER_ERROR( "RootE::_endElement %s Must NOT HAPPEN!!!",name.c_str()); } } } @@ -156,7 +156,7 @@ void RootElement::_endElement(const std::string &ns,const std::string &name) if (--s.m_depth > 0) { space = ""; - ANTCC_PARSER_DEBUG("%sCplx(%0x)::_endElement 3 name=%s s.depth=%d context.size=%d" + ANTCC_PARSER_DEBUG("%sRoot(%0x)::_endElement 3 name=%s s.depth=%d context.size=%d" ,space.insert(0,s.m_depth,' ').c_str() ,this ,name.c_str() @@ -169,13 +169,13 @@ void RootElement::_endElement(const std::string &ns,const std::string &name) std::cout<<"No parser here\n"; } else { - ANTCC_PARSER_DEBUG("CplxE(%0x)::_endElement %s 4 %s same parser " + ANTCC_PARSER_DEBUG("RootE(%0x)::_endElement %s 4 %s same parser " , this , name.c_str() , (this==s.m_parser.get())?"yes":"no"); if (s.m_parser ) { - ANTCC_PARSER_DEBUG("CplxE(%0x)::_endElement call postImpl %s" + ANTCC_PARSER_DEBUG("RootE(%0x)::_endElement call postImpl %s" ,this ,name.c_str()); s.m_parser->postImpl(); @@ -183,14 +183,14 @@ void RootElement::_endElement(const std::string &ns,const std::string &name) if (!endElementImpl(ns,name)) { - ANTCC_PARSER_ERROR("CplxE::_endElement failed call endElementImpl %s" + ANTCC_PARSER_ERROR("RootE::_endElement failed call endElementImpl %s" ,name.c_str()); // Wrong //this->endAnyElement(ns,name); } } } - ANTCC_PARSER_DEBUG("CplxE::_endElement LEAVE this=%0x name=%s,s.m_depth=%d m_context.size=%d" + ANTCC_PARSER_DEBUG("RootE::_endElement LEAVE this=%0x name=%s,s.m_depth=%d m_context.size=%d" , this ,name.c_str() ,s.m_depth @@ -209,19 +209,19 @@ void RootElement::_endElement(const std::string &ns,const std::string &name) State &s(m_context.back()); if (s.m_any) { - ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre any name=%s",name.c_str()); + ANTCC_PARSER_DEBUG_CPLX_ATTR("RootElt::_Attributre any name=%s",name.c_str()); anyAttribute(ns,name,val); } else if (s.m_parser) { - ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre with parser name=%s",name.c_str()); + ANTCC_PARSER_DEBUG_CPLX_ATTR("RootElt::_Attributre with parser name=%s",name.c_str()); s.m_parser->_Attribute(ns,name,val); } } else { - ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre call this->AttributeImpl name=%s",name.c_str()); + ANTCC_PARSER_DEBUG_CPLX_ATTR("RootElt::_Attributre call this->AttributeImpl name=%s",name.c_str()); if ( ! this->AttributeImpl(ns,name,val) ) { - ANTCC_PARSER_ERROR("Cplx::_AttributeImpl name=%s unsupported" + ANTCC_PARSER_ERROR("RootElt::_AttributeImpl name=%s unsupported" ,name.c_str()); } } @@ -238,22 +238,22 @@ void RootElement::_Characters(const std::string &val) { if (s.m_parser) { #ifdef PARSER_DEBUG_CHARACTER - std::cout<<"CplxE::_characters"<