Back to index

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

This filter will suppress the closing tag for the next opening tag. More...

#include <saxfilter.h>

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

List of all members.

Public Member Functions

 KeepOpen (SaxHandler *delegate)
virtual void begin (const Xml_string &tag, Xml_attr attr)
virtual void end (const Xml_string &tag)
Xml_string openTag ()
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_tag

Detailed Description

This filter will suppress the closing tag for the next opening tag.

This allows to add content to the element, eg: KeepOpen keepOpenHandler( &myhandler ); myElem.saxx(keepOpenHandler); more_output (myhandler); myhandler.end(keepOpenhandler.opentag());

Definition at line 44 of file saxfilter.h.


Constructor & Destructor Documentation

KeepOpen::KeepOpen ( SaxHandler delegate)

Definition at line 31 of file saxfilter.cpp.

: SaxFilter(delegate), m_level(0) {}

Member Function Documentation

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

Reimplemented from SaxFilter.

Definition at line 33 of file saxfilter.cpp.

{
       ++m_level;
       if (m_level == 1)
              m_tag = tag;
       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 KeepOpen::end ( const Xml_string tag) [virtual]

Reimplemented from SaxFilter.

Definition at line 41 of file saxfilter.cpp.

{
       --m_level;
       if (m_level > 0)
              SaxFilter::end(tag);
}
void SaxFilter::endDoc ( ) [virtual, inherited]

Implements SaxHandler.

Definition at line 10 of file saxfilter.cpp.

Here is the call graph for this function:

Definition at line 48 of file saxfilter.cpp.

{
       return m_tag;
}
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 51 of file saxfilter.h.

Definition at line 52 of file saxfilter.h.


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