Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

BXMLOutput Class Reference

#include <BXMLOutput.hpp>

Inheritance diagram for BXMLOutput::

ISAXClient List of all members.

Public Methods

 BXMLOutput ()
virtual ~BXMLOutput ()
virtual void startElement (char *str, int len)
virtual void endElement (char *str, int len)
virtual void endEmptyElement ()
virtual void startAttribute (char *str, int len)
virtual void endAttribute (char *str=NULL, int len=0)
virtual void characters (char *str, int len)
virtual void whitespaces (char *str, int len)
virtual void attribWhitespaces (char *str, int len)

Constructor & Destructor Documentation

BXMLOutput::BXMLOutput   [inline]
 

Definition at line 79 of file BXMLOutput.hpp.

00080         {
00081                 IFileStream* pfs;
00082                 CreateFileStream(&IID_IFileStream, (void**)&pfs);
00083 
00084                 if (pfs)
00085                 {
00086                         // Want to save this output as stdout
00087                         pfs->SetFile(stdout);
00088                         CreateTSAX2Bin(&IID_ITSAXContentHandler, (void**)&m_pch);
00089 
00090                         if (m_pch)
00091                         {
00092                                 IUnknownCL_Init(m_pch, pfs, true);
00093                         }
00094                         pfs->Release();
00095                 }
00096                 m_pch->AddRef();
00097                 m_pch->startDocument();
00098         }

virtual BXMLOutput::~BXMLOutput   [inline, virtual]
 

Definition at line 101 of file BXMLOutput.hpp.

00102         {
00103                 m_pch->endDocument();
00104                 m_pch->Release();
00105         }


Member Function Documentation

virtual void BXMLOutput::attribWhitespaces char *    str,
int    len
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 183 of file BXMLOutput.hpp.

00184         {
00185                 // Nothing...
00186         }

virtual void BXMLOutput::characters char *    str,
int    len
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 151 of file BXMLOutput.hpp.

00152         {
00153                 // Handles a piece of text.
00154                 // 'leftwslen' and 'rightwslen' specify how many white spaces (' ', '\n', ...)
00155                 // are on the left and right end of the text.
00156                 // If 'iscont=1', then 'rightwslen' must be zero and for the text piece
00157                 // coming afterwards, 'leftwslen' must be zero.
00158                 // It is also possible that 'len=leftwslen=rightwslen'
00159 
00160                 //
00161                 // hide the leading and trailing whitespace from the TSAX client
00162                 //
00163 
00164                 // Have to check int leftwslen,int rightwslen
00165                 // str += leftwslen;
00166                 // len = len - (leftwslen + rightwslen);
00167 
00168                 len = max(0,len);
00169 
00170                 _CopyStringToBuffer(str, len);
00171 
00172                 if (m_cch > 0)
00173                 {
00174                         m_pch->characters(m_psz, m_cch);
00175                 }
00176         }

virtual void BXMLOutput::endAttribute char *    str = NULL,
int    len = 0
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 146 of file BXMLOutput.hpp.

00147         {
00148                 // Nothing...
00149         }

virtual void BXMLOutput::endElement char *    str,
int    len
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 118 of file BXMLOutput.hpp.

00119         {
00120                 // Handles an end tag
00121 
00122                 _CopyStringToBuffer(str, len);
00123                 XTOKEN xt = g_ptt->XTOKENFromStr(m_psz, XST_ELEMENT);
00124                 m_pch->endElement(xt);
00125         }

virtual void BXMLOutput::endEmptyElement   [inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 127 of file BXMLOutput.hpp.

00128         {
00129                 // Handles an end tag
00130                 // Need more study for this case
00131                 // IMPLEMENT LATER
00132                 m_pch->endElement(xmllabel);
00133         }

virtual void BXMLOutput::startAttribute char *    str,
int    len
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 135 of file BXMLOutput.hpp.

00136         {
00137                 // Handles a given attribute name
00138                 _CopyStringToBuffer(str, len);
00139                 m_xtAttribute = g_ptt->XTOKENFromStr(m_psz, XST_ATTRIBUTE);
00140 
00141                 // Handles an attribute value
00142                 _CopyStringToBuffer(str, len);
00143                 m_pch->attribute(m_xtAttribute, m_psz, m_cch);
00144         }

virtual void BXMLOutput::startElement char *    str,
int    len
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 109 of file BXMLOutput.hpp.

00110         {
00111                 // HandleStartLabel
00112                 _CopyStringToBuffer(str, len);
00113                 XTOKEN xt = g_ptt->XTOKENFromStr(m_psz, XST_ELEMENT); // "bib"
00114                 xmllabel = xt;
00115                 m_pch->startElement(xt);
00116         }

virtual void BXMLOutput::whitespaces char *    str,
int    len
[inline, virtual]
 

Reimplemented from ISAXClient.

Definition at line 178 of file BXMLOutput.hpp.

00179         {
00180                 // Nothing...
00181         }


The documentation for this class was generated from the following file:
Generated on Sat Dec 22 16:01:56 2001 for XMILLforBinaryFormat by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001