Sophie

Sophie

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

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::ParseContext 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::ParseContext Class Reference<br>
<small>
[<a class="el" href="group__Markup.html">Simple XML Subset Parser</a>]</small>
</h1>A parse context is used to parse marked-up documents. 
<a href="#_details">More...</a>
<p>
Inheritance diagram for Glib::Markup::ParseContext:<p><center><img src="classGlib_1_1Markup_1_1ParseContext__inherit__graph.png" border="0" usemap="#Glib_1_1Markup_1_1ParseContext__inherit__map" alt="Inheritance graph"></center>
<map name="Glib_1_1Markup_1_1ParseContext__inherit__map">
<area href="classSigC_1_1Object.html" shape="rect" coords="49,17,135,36" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classGlib_1_1Markup_1_1ParseContext-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 Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a0">ParseContext</a> (<a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a>&amp; parser, <a class="el" href="group__glibmmEnums.html#a42">ParseFlags</a> flags=<a class="el" href="group__glibmmEnums.html#a42">ParseFlags</a>(0))</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a new parse context.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a1">~ParseContext</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a2">parse</a> (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>Feed some data to the <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a3">parse</a> (const char* text_begin, const char* text_end)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Feed some data to the <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a4">end_parse</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Signals to the <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a> that all data has been fed into the parse context with <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a2">parse()</a>.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a5">get_element</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieves the name of the currently open element.</em> <a href="#a5"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a6">get_line_number</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieves the current line number.</em> <a href="#a6"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a7">get_char_number</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieves the number of the current character on the current line.</em> <a href="#a7"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a>*&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a8">get_parser</a> ()</td></tr>
<tr><td nowrap align=right valign=top>const <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a>*&nbsp;</td><td valign=bottom><a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a9">get_parser</a> () const</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A parse context is used to parse marked-up documents.
<p>
You can feed any number of documents into a context, as long as no errors occur; once an error occurs, the parse context can't continue to parse text (you have to destroy it and create a new parse context). 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Glib::Markup::ParseContext::ParseContext"></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::ParseContext::ParseContext </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top"><a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a>&amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>parser</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__glibmmEnums.html#a42">ParseFlags</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>flags</em> = <a class="el" href="group__glibmmEnums.html#a42">ParseFlags</a>(0)</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [explicit]</code></td>
        </tr>

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

<p>
Creates a new parse context.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>parser</em>&nbsp;</td><td>A <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Markup::Parser</a> instance. </td></tr>
    <tr><td valign=top><em>flags</em>&nbsp;</td><td>Bitwise combination of <a class="el" href="group__glibmmEnums.html#a42">Markup::ParseFlags</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="a1" doxytag="Glib::Markup::ParseContext::~ParseContext"></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::ParseContext::~ParseContext </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> [virtual]</code></td>
        </tr>

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

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a4" doxytag="Glib::Markup::ParseContext::end_parse"></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"> void Glib::Markup::ParseContext::end_parse </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></td>
        </tr>

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

<p>
Signals to the <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a> that all data has been fed into the parse context with <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html#a2">parse()</a>.
<p>
This method reports an error if the document isn't complete, for example if elements are still open. <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></td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="a7" doxytag="Glib::Markup::ParseContext::get_char_number"></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"> int Glib::Markup::ParseContext::get_char_number </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> const</td>
        </tr>

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

<p>
Retrieves the number of the current character on the current line.
<p>
Intended for use in error messages; there are no strict semantics for what constitutes the "current" character number other than "the best number we could come up with for error messages."     </td>
  </tr>
</table>
<a name="a5" doxytag="Glib::Markup::ParseContext::get_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"> <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Glib::Markup::ParseContext::get_element </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> const</td>
        </tr>

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

<p>
Retrieves the name of the currently open element.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The name of the currently open element, or <code>""</code>. </dd></dl>
    </td>
  </tr>
</table>
<a name="a6" doxytag="Glib::Markup::ParseContext::get_line_number"></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"> int Glib::Markup::ParseContext::get_line_number </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> const</td>
        </tr>

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

<p>
Retrieves the current line number.
<p>
Intended for use in error messages; there are no strict semantics for what constitutes the "current" line number other than "the best number we could come up with for error messages."     </td>
  </tr>
</table>
<a name="a9" doxytag="Glib::Markup::ParseContext::get_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"> const <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a>* Glib::Markup::ParseContext::get_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> const<code> [inline]</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="a8" doxytag="Glib::Markup::ParseContext::get_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"> <a class="el" href="classGlib_1_1Markup_1_1Parser.html">Parser</a>* Glib::Markup::ParseContext::get_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> [inline]</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="a3" doxytag="Glib::Markup::ParseContext::parse"></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"> void Glib::Markup::ParseContext::parse </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top">const char*&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>text_begin</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char*&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>text_end</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

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

<p>
Feed some data to the <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>.
<p>
The data need not be valid UTF-8; an error will be signalled if it's invalid. The data need not be an entire document; you can feed a document into the parser incrementally, via multiple calls to this function. Typically, as you receive data from a network connection or file, you feed each received chunk of data into this function, aborting the process if an error occurs. Once an error is reported, no further data may be fed to the ParseContext; all errors are fatal. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>text_begin</em>&nbsp;</td><td>Begin of chunk of text to parse. </td></tr>
    <tr><td valign=top><em>text_end</em>&nbsp;</td><td>End of chunk of text to parse. </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></td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a name="a2" doxytag="Glib::Markup::ParseContext::parse"></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"> void Glib::Markup::ParseContext::parse </td>
          <td class="md" valign="top">(</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>&amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>text</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

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

<p>
Feed some data to the <a class="el" href="classGlib_1_1Markup_1_1ParseContext.html">ParseContext</a>.
<p>
The data need not be valid UTF-8; an error will be signalled if it's invalid. The data need not be an entire document; you can feed a document into the parser incrementally, via multiple calls to this function. Typically, as you receive data from a network connection or file, you feed each received chunk of data into this function, aborting the process if an error occurs. Once an error is reported, no further data may be fed to the ParseContext; all errors are fatal. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>text</em>&nbsp;</td><td>Chunk of text to parse. </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></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>