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