Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Private Attributes
RenameElem Class Reference

Renames the next opening(and corresponding closing) tag. More...

#include <saxfilter.h>

Inheritance diagram for RenameElem:
Inheritance graph
[legend]
Collaboration diagram for RenameElem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RenameElem (SaxHandler *delegate, const Xml_string &oldname, const Xml_string &newname)
 RenameElem (SaxHandler *delegate, const Xml_string &newname)
virtual void begin (const Xml_string &tag, Xml_attr attr)
virtual void end (const Xml_string &tag)
void setDelegate (SaxHandler *delegate)
SaxHandlerdelegate ()
virtual void beginDoc ()
virtual void endDoc ()
virtual void chars (const Xml_string &text)
void beginEnd (const Xml_string &tag, Xml_attr attr)

Private Attributes

int m_level
Xml_string m_old
Xml_string m_new

Detailed Description

Renames the next opening(and corresponding closing) tag.

If oldname is not empty, it will also rename all inner tags with name oldname

Definition at line 60 of file saxfilter.h.


Constructor & Destructor Documentation

RenameElem::RenameElem ( SaxHandler delegate,
const Xml_string oldname,
const Xml_string newname 
)

Definition at line 53 of file saxfilter.cpp.

: SaxFilter(delegate), m_level(0), m_old(oldname), m_new(newname) {}
RenameElem::RenameElem ( SaxHandler delegate,
const Xml_string newname 
)

Definition at line 56 of file saxfilter.cpp.

: SaxFilter(delegate), m_level(0), m_old(""), m_new(newname) {}

Member Function Documentation

void RenameElem::begin ( const Xml_string tag,
Xml_attr  attr 
) [virtual]

Reimplemented from SaxFilter.

Definition at line 59 of file saxfilter.cpp.

{
       ++m_level;
       if (m_level == 1 || m_old == tag)
              SaxFilter::begin(m_new, attr);
       else
              SaxFilter::begin(tag, attr);
}
void SaxFilter::beginDoc ( ) [virtual, inherited]

Implements SaxHandler.

Definition at line 5 of file saxfilter.cpp.

Here is the call graph for this function:

void SaxHandler::beginEnd ( const Xml_string tag,
Xml_attr  attr 
) [inline, inherited]

Definition at line 32 of file saxhandler.h.

{
       begin(tag, attr);
       end(tag);
}

Here is the call graph for this function:

void SaxFilter::chars ( const Xml_string text) [virtual, inherited]

Implements SaxHandler.

Reimplemented in UniqueID.

Definition at line 25 of file saxfilter.cpp.

{
       m_delegate->chars(text);
}

Here is the call graph for this function:

SaxHandler* SaxFilter::delegate ( ) [inline, inherited]

Definition at line 24 of file saxfilter.h.

{ return m_delegate; }

Here is the caller graph for this function:

void RenameElem::end ( const Xml_string tag) [virtual]

Reimplemented from SaxFilter.

Definition at line 68 of file saxfilter.cpp.

{
       if (m_level == 1 || m_old == tag)
              SaxFilter::end(m_new);
       else
              SaxFilter::end(tag);
       --m_level;
}
void SaxFilter::endDoc ( ) [virtual, inherited]

Implements SaxHandler.

Definition at line 10 of file saxfilter.cpp.

Here is the call graph for this function:

void SaxFilter::setDelegate ( SaxHandler delegate) [inline, inherited]

Definition at line 23 of file saxfilter.h.

Here is the call graph for this function:


Member Data Documentation

Definition at line 67 of file saxfilter.h.

Definition at line 69 of file saxfilter.h.

Definition at line 68 of file saxfilter.h.


The documentation for this class was generated from the following files: