diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-01-05 10:26:10 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-01-05 10:26:10 (GMT) |
commit | a66e1ada3c7467e267ff39262178fa4577f0b6ab (patch) | |
tree | ee15d10d932fa1d21de3ebfcb445e2bd81b9f00b /addon/doxmlparser/src/dochandler.cpp | |
parent | ff11b7d98ad7d24770afd151aa6b439adc7506d2 (diff) | |
download | Doxygen-a66e1ada3c7467e267ff39262178fa4577f0b6ab.zip Doxygen-a66e1ada3c7467e267ff39262178fa4577f0b6ab.tar.gz Doxygen-a66e1ada3c7467e267ff39262178fa4577f0b6ab.tar.bz2 |
Release-1.2.13.1
Diffstat (limited to 'addon/doxmlparser/src/dochandler.cpp')
-rw-r--r-- | addon/doxmlparser/src/dochandler.cpp | 95 |
1 files changed, 75 insertions, 20 deletions
diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp index 3350cf4..b670de2 100644 --- a/addon/doxmlparser/src/dochandler.cpp +++ b/addon/doxmlparser/src/dochandler.cpp @@ -232,47 +232,85 @@ void ListItemHandler::startParagraph(const QXmlAttributes& attrib) m_children.append(parHandler); } +IDocIterator *ListItemHandler::contents() const +{ + return new ListItemIterator(*this); +} + //---------------------------------------------------------------------- -// ListHandler +// OrderedListHandler //---------------------------------------------------------------------- -ListHandler::ListHandler(Kind k,IBaseHandler *parent) - : m_parent(parent), m_kind(k) +OrderedListHandler::OrderedListHandler(IBaseHandler *parent) : m_parent(parent) { m_children.setAutoDelete(TRUE); - const char *endListName=0; - switch(k) - { - case ItemizedList : endListName="itemizedlist"; break; - case OrderedList : endListName="orderedlist"; break; - default: ASSERT(0); - } - addEndHandler(endListName,this,&ListHandler::endList); + addEndHandler("orderedlist",this,&OrderedListHandler::endOrderedList); + addStartHandler("listitem",this,&OrderedListHandler::startOrderedListItem); +} - addStartHandler("listitem",this,&ListHandler::startListItem); +OrderedListHandler::~OrderedListHandler() +{ +} + +void OrderedListHandler::startOrderedList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); } -ListHandler::~ListHandler() +void OrderedListHandler::endOrderedList() { + m_parent->setDelegate(0); } -void ListHandler::startList(const QXmlAttributes& /*attrib*/) +void OrderedListHandler::startOrderedListItem(const QXmlAttributes& attrib) +{ + ListItemHandler *liHandler = new ListItemHandler(this); + liHandler->startListItem(attrib); + m_children.append(liHandler); +} + +IDocIterator *OrderedListHandler::elements() const +{ + return new OrderedListIterator(*this); +} + +//---------------------------------------------------------------------- +// ItemizedListHandler +//---------------------------------------------------------------------- + +ItemizedListHandler::ItemizedListHandler(IBaseHandler *parent) : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("itemizedlist",this,&ItemizedListHandler::endItemizedList); + addStartHandler("listitem",this,&ItemizedListHandler::startItemizedListItem); +} + +ItemizedListHandler::~ItemizedListHandler() +{ +} + +void ItemizedListHandler::startItemizedList(const QXmlAttributes& /*attrib*/) { m_parent->setDelegate(this); } -void ListHandler::endList() +void ItemizedListHandler::endItemizedList() { m_parent->setDelegate(0); } -void ListHandler::startListItem(const QXmlAttributes& attrib) +void ItemizedListHandler::startItemizedListItem(const QXmlAttributes& attrib) { ListItemHandler *liHandler = new ListItemHandler(this); liHandler->startListItem(attrib); m_children.append(liHandler); } +IDocIterator *ItemizedListHandler::elements() const +{ + return new ItemizedListIterator(*this); +} + //---------------------------------------------------------------------- // ParameterHandler //---------------------------------------------------------------------- @@ -372,6 +410,11 @@ void ParameterListHandler::startParameterDescription(const QXmlAttributes& attri m_curParam->startParameterDescription(attrib); } +IDocIterator *ParameterListHandler::params() const +{ + return new ParameterListIterator(*this); +} + //---------------------------------------------------------------------- // LinkHandler //---------------------------------------------------------------------- @@ -1116,6 +1159,8 @@ TableHandler::TableHandler(IBaseHandler *parent) m_children.setAutoDelete(TRUE); addEndHandler("table",this,&TableHandler::endTable); addStartHandler("row",this,&TableHandler::startRow); + addStartHandler("caption",this,&TableHandler::startCaption); + addEndHandler("caption",this,&TableHandler::endCaption); } TableHandler::~TableHandler() @@ -1141,6 +1186,16 @@ void TableHandler::startRow(const QXmlAttributes& attrib) m_children.append(rh); } +void TableHandler::startCaption(const QXmlAttributes& /*attrib*/) +{ + m_curString=""; +} + +void TableHandler::endCaption() +{ + m_caption = m_curString; +} + //---------------------------------------------------------------------- // ParagraphHandler //---------------------------------------------------------------------- @@ -1195,16 +1250,16 @@ void ParagraphHandler::endParagraph() void ParagraphHandler::startItemizedList(const QXmlAttributes& attrib) { addTextNode(); - ListHandler *listHandler = new ListHandler(ItemizedList,this); - listHandler->startList(attrib); + ItemizedListHandler *listHandler = new ItemizedListHandler(this); + listHandler->startItemizedList(attrib); m_children.append(listHandler); } void ParagraphHandler::startOrderedList(const QXmlAttributes& attrib) { addTextNode(); - ListHandler *listHandler = new ListHandler(OrderedList,this); - listHandler->startList(attrib); + OrderedListHandler *listHandler = new OrderedListHandler(this); + listHandler->startOrderedList(attrib); m_children.append(listHandler); } |