diff options
Diffstat (limited to 'addon/xmlparse/memberhandler.cpp')
-rw-r--r-- | addon/xmlparse/memberhandler.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/addon/xmlparse/memberhandler.cpp b/addon/xmlparse/memberhandler.cpp index cf29e05..54dd0f0 100644 --- a/addon/xmlparse/memberhandler.cpp +++ b/addon/xmlparse/memberhandler.cpp @@ -37,7 +37,15 @@ MemberHandler::MemberHandler(IBaseHandler *parent) addStartHandler("location",this,&MemberHandler::startLocation); addEndHandler("location"); + addStartHandler("references",this,&MemberHandler::startReferences); + addEndHandler("references",this,&MemberHandler::endReferences); + + addStartHandler("referencedby",this,&MemberHandler::startReferencedBy); + addEndHandler("referencedby",this,&MemberHandler::endReferencedBy); + m_params.setAutoDelete(TRUE); + m_references.setAutoDelete(TRUE); + m_referencedBy.setAutoDelete(TRUE); } @@ -78,6 +86,32 @@ void MemberHandler::startLocation(const QXmlAttributes& attrib) m_defLine = attrib.value("line").toInt(); } +void MemberHandler::startReferences(const QXmlAttributes& attrib) +{ + MemberReference *mr = new MemberReference; + mr->m_memId = attrib.value("id"); + m_references.append(mr); + m_curString=""; +} + +void MemberHandler::endReferences() +{ + m_references.getLast()->m_name = m_curString; +} + +void MemberHandler::startReferencedBy(const QXmlAttributes& attrib) +{ + MemberReference *mr = new MemberReference; + mr->m_memId = attrib.value("id"); + m_referencedBy.append(mr); + m_curString=""; +} + +void MemberHandler::endReferencedBy() +{ + m_referencedBy.getLast()->m_name = m_curString; +} + void MemberHandler::endMember() { m_parent->setDelegate(0); |