Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/addon/doxmlparser/src/loamhandler.cpp

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1#include "loamhandler.h"
2#include "memberhandler.h"
3
4
5ListOfAllMembersHandler::ListOfAllMembersHandler(IBaseHandler *parent) : m_parent(parent)
6{
7 m_members.setAutoDelete(TRUE);
8
9 addStartHandler("member",this,&ListOfAllMembersHandler::startMember);
10 addStartHandler("name",this,&ListOfAllMembersHandler::startName);
11 addEndHandler("name",this,&ListOfAllMembersHandler::endName);
12 addStartHandler("scope",this,&ListOfAllMembersHandler::startScope);
13 addEndHandler("scope",this,&ListOfAllMembersHandler::endScope);
14
15 addEndHandler("listofallmembers",this,&ListOfAllMembersHandler::endListOfAllMembers);
16}
17
18void ListOfAllMembersHandler::initialize(MainHandler *mh)
19{
20 QListIterator<MemberReference> mli(m_members);
21 MemberReference *mr;
22 for (;(mr=mli.current());++mli)
23 {
24 mr->initialize(mh);
25 }
26}
27
28void ListOfAllMembersHandler::startMember(const QXmlAttributes& attrib)
29{
30 MemberReference *mr = new MemberReference;
31 mr->m_memId = attrib.value("refid");
32 mr->m_virtualness = attrib.value("virt");
33 mr->m_protection = attrib.value("prot");
34 mr->m_ambiguityScope = attrib.value("ambiguityscope");
35 m_members.append(new MemberReference);
36}
37
38void ListOfAllMembersHandler::startName(const QXmlAttributes&)
39{
40 m_curString="";
41}
42
43void ListOfAllMembersHandler::endName()
44{
45 ASSERT(m_members.getLast());
46 m_members.getLast()->m_name = m_curString;
47}
48
49void ListOfAllMembersHandler::startScope(const QXmlAttributes&)
50{
51 m_curString="";
52}
53
54void ListOfAllMembersHandler::endScope()
55{
56 ASSERT(m_members.getLast());
57 m_members.getLast()->m_scope = m_curString;
58}
59
60void ListOfAllMembersHandler::startListOfAllMembers(const QXmlAttributes& /*attrib*/)
61{
62 m_parent->setDelegate(this);
63 debug(2,"listofallmembers start\n");
64}
65
66void ListOfAllMembersHandler::endListOfAllMembers()
67{
68 m_parent->setDelegate(0);
69 debug(2,"listofallmembers end\n");
70}
71
72IMemberReferenceIterator *ListOfAllMembersHandler::members() const
73{
74 return new MemberReferenceIterator(m_members);
75}
76

Archive Download this file

Revision: 1322