Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > e0521f28751d07a87e3a3d6c7d15a1ac > files > 716

libgtkmm2.0_1-devel-2.2.1-2mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Glib::Markup::Parser class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<table border="0" width="100%">
<tr>
    <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td>
    <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td>
</tr>
</table>
<center>
  <a class="qindex" href="../../index.html">Main Page</a> &nbsp;
  <a href="group__Widgets.html">Widgets</a> &nbsp;
  <a class="qindex" href="namespaces.html"> Namespaces</a> &nbsp;
  <a href="../../tutorial/html/index.html"> Book</a> &nbsp;
</center>
<hr width="100%"/>

<!-- Generated by Doxygen 1.3-rc1 -->
<h1>Glib::Markup::Parser Class Reference<br>
<small>
[<a class="el" href="group__Markup.html">Simple XML Subset Parser</a>]</small>
</h1>The abstract markup parser base class. 
<a href="#_details">More...</a>
<p>
Inheritance diagram for Glib::Markup::Parser:<p><center><img src="classGlib_1_1Markup_1_1Parser__inherit__graph.png" border="0" usemap="#Glib_1_1Markup_1_1Parser__inherit__map" alt="Inheritance graph"></center>
<map name="Glib_1_1Markup_1_1Parser__inherit__map">
<area href="classSigC_1_1Object.html" shape="rect" coords="47,17,97,36" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classGlib_1_1Markup_1_1Parser-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef std::map&lt; <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>,<br>
 <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>, <a class="el" href="classGlib_1_1Markup_1_1AttributeKeyLess.html">Glib::Markup::AttributeKeyLess</a> &gt;&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#s0">AttributeMap</a></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#a0">~Parser</a> ()=0</td></tr>
<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#b0">Parser</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Constructs a <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a> object.</em> <a href="#b0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#b1">on_start_element</a> (<a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp; context, const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; element_name, const <a class="el" href="classGlib_1_1Markup_1_1Parser.html#s0">AttributeMap</a>&amp; attributes)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called for open tags <code>&lt;foo bar="baz"&gt;</code>.</em> <a href="#b1"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#b2">on_end_element</a> (<a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp; context, const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; element_name)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called for close tags <code>&lt;/foo&gt;</code>.</em> <a href="#b2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#b3">on_text</a> (<a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp; context, const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; text)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called for character data.</em> <a href="#b3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#b4">on_passthrough</a> (<a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp; context, const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp; passthrough_text)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called for strings that should be re-saved verbatim in this same position, but are not otherwise interpretable.</em> <a href="#b4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1Parser.html#b5">on_error</a> (<a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp; context, const <a class="el" href="classGlib_1_1MarkupError.html">MarkupError</a>&amp; error)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Called on error, including one thrown by an overridden virtual method.</em> <a href="#b5"></a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The abstract markup parser base class.
<p>
To implement a parser for your markup format, derive from Glib::Markup::Parser and implement the virtual methods.
<p>
You don't have to override all of the virtual methods. If a particular method is not implement the data passed to it will be ignored. Except for the error method, any of these callbacks can throw an error exception; in particular the <a class="el" href="group__Markup.html#s6a5">MarkupError::UNKNOWN_ELEMENT</a>, <a class="el" href="group__Markup.html#s6a6">MarkupError::UNKNOWN_ATTRIBUTE</a>, and <a class="el" href="group__Markup.html#s6a7">MarkupError::INVALID_CONTENT</a> errors are intended to be thrown from these overridden methods. If you throw an error from a method, <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a2">Glib::Markup::ParseContext::parse()</a> will report that error back to its caller. 
<p>
<hr><h2>Member Typedef Documentation</h2>
<a name="s0" doxytag="Glib::Markup::Parser::AttributeMap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef std::map&lt;<a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>, <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>, <a class="el" href="classGlib_1_1Markup_1_1AttributeKeyLess.html">Glib::Markup::AttributeKeyLess</a>&gt; Glib::Markup::Parser::AttributeMap
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Glib::Markup::Parser::~Parser"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual Glib::Markup::Parser::~Parser </td>
          <td class="md" valign="top">(</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a name="b0" doxytag="Glib::Markup::Parser::Parser"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> Glib::Markup::Parser::Parser </td>
          <td class="md" valign="top">(</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructs a <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a> object.
<p>
Note that <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Markup::Parser</a> is an abstract class which can't be instantiated directly. To implement the parser for your markup format, derive from <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Markup::Parser</a> and implement the virtual methods.     </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="b2" doxytag="Glib::Markup::Parser::on_end_element"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Glib::Markup::Parser::on_end_element </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>context</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>element_name</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called for close tags <code>&lt;/foo&gt;</code>.
<p>
This virtual method is invoked when the closing tag of an element is seen. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>context</em>&nbsp;</td><td>The <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">Markup::ParseContext</a> object the parsed data belongs to. </td></tr>
    <tr><td valign=top><em>element_name</em>&nbsp;</td><td>The name of the element. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>Glib::MarkupError</em>&nbsp;</td><td>An exception <em>you</em> should throw if something went wrong, for instance if an unknown attribute name was encountered. In particular the <a class="el" href="group__Markup.html#s6a5">MarkupError::UNKNOWN_ELEMENT</a>, <a class="el" href="group__Markup.html#s6a6">MarkupError::UNKNOWN_ATTRIBUTE</a>, and <a class="el" href="group__Markup.html#s6a7">MarkupError::INVALID_CONTENT</a> errors are intended to be thrown from user-implemented methods. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="b5" doxytag="Glib::Markup::Parser::on_error"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Glib::Markup::Parser::on_error </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>context</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGlib_1_1MarkupError.html">MarkupError</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>error</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called on error, including one thrown by an overridden virtual method.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>context</em>&nbsp;</td><td>The <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">Markup::ParseContext</a> object the parsed data belongs to. </td></tr>
    <tr><td valign=top><em>error</em>&nbsp;</td><td>A <a class="el" href="classGlib_1_1MarkupError.html">MarkupError</a> object with detailed information about the error. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="b4" doxytag="Glib::Markup::Parser::on_passthrough"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Glib::Markup::Parser::on_passthrough </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>context</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>passthrough_text</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called for strings that should be re-saved verbatim in this same position, but are not otherwise interpretable.
<p>
This virtual method is invoked for comments, processing instructions and doctype declarations; if you're re-writing the parsed document, write the passthrough text back out in the same position. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>context</em>&nbsp;</td><td>The <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">Markup::ParseContext</a> object the parsed data belongs to. </td></tr>
    <tr><td valign=top><em>passthrough_text</em>&nbsp;</td><td>The text that should be passed through. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>Glib::MarkupError</em>&nbsp;</td><td>An exception <em>you</em> should throw if something went wrong, for instance if an unknown attribute name was encountered. In particular the <a class="el" href="group__Markup.html#s6a5">MarkupError::UNKNOWN_ELEMENT</a>, <a class="el" href="group__Markup.html#s6a6">MarkupError::UNKNOWN_ATTRIBUTE</a>, and <a class="el" href="group__Markup.html#s6a7">MarkupError::INVALID_CONTENT</a> errors are intended to be thrown from user-implemented methods. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="b1" doxytag="Glib::Markup::Parser::on_start_element"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Glib::Markup::Parser::on_start_element </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>context</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>element_name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGlib_1_1Markup_1_1Parser.html#s0">AttributeMap</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>attributes</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called for open tags <code>&lt;foo bar="baz"&gt;</code>.
<p>
This virtual method is invoked when the opening tag of an element is seen. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>context</em>&nbsp;</td><td>The <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">Markup::ParseContext</a> object the parsed data belongs to. </td></tr>
    <tr><td valign=top><em>element_name</em>&nbsp;</td><td>The name of the element. </td></tr>
    <tr><td valign=top><em>attributes</em>&nbsp;</td><td>A map of attribute name/value pairs. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>Glib::MarkupError</em>&nbsp;</td><td>An exception <em>you</em> should throw if something went wrong, for instance if an unknown attribute name was encountered. In particular the <a class="el" href="group__Markup.html#s6a5">MarkupError::UNKNOWN_ELEMENT</a>, <a class="el" href="group__Markup.html#s6a6">MarkupError::UNKNOWN_ATTRIBUTE</a>, and <a class="el" href="group__Markup.html#s6a7">MarkupError::INVALID_CONTENT</a> errors are intended to be thrown from user-implemented methods. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="b3" doxytag="Glib::Markup::Parser::on_text"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void Glib::Markup::Parser::on_text </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>context</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>text</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Called for character data.
<p>
This virtual method is invoked when some text is seen (text is always inside an element). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>context</em>&nbsp;</td><td>The <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">Markup::ParseContext</a> object the parsed data belongs to. </td></tr>
    <tr><td valign=top><em>text</em>&nbsp;</td><td>The parsed text in UTF-8 encoding. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>Glib::MarkupError</em>&nbsp;</td><td>An exception <em>you</em> should throw if something went wrong, for instance if an unknown attribute name was encountered. In particular the <a class="el" href="group__Markup.html#s6a5">MarkupError::UNKNOWN_ELEMENT</a>, <a class="el" href="group__Markup.html#s6a6">MarkupError::UNKNOWN_ATTRIBUTE</a>, and <a class="el" href="group__Markup.html#s6a7">MarkupError::INVALID_CONTENT</a> errors are intended to be thrown from user-implemented methods. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="markup_8h.html">markup.h</a></ul>
<hr><address><small>
Generated for gtkmm by <a href="http://www.doxygen.org/index.html">
Doxygen</a> 1.3-rc1 &copy;&nbsp;1997-2001</small></address>
</body>
</html>