Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 54cac1c2268db633d66eeff1b4faa585 > files > 460

frepple-doc-0.8.1-3.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>C++ API frePPLe: frepple::utils::XMLElement Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="../styles.css" rel="stylesheet"  type="text/css">
</head>
<body>
<div id="container">

<div id="menubar"> 
<div id="logo" align="center">
<br/><img src='../frepple.bmp' alt="frepple" /><br/>
<a href='http://www.frepple.com/'>
<strong>a Free<br/>Production Planning<br/>Library</strong>
</a>
</div>
<div id="menu">
<br/>
<h3><a href='../Main/HomePage.html'>Main</a></h3>
<h3><a href='../UI/Main.html'>User Manual</a></h3>
<h3><a href='../Tutorial/Main.html'>Tutorial</a></h3>
<h3><a href='../Frepple/Main.html'>Reference Manual</a></h3>
<h3><a href='../Main/FAQ.html'>FAQ</a></h3>
<h3><a href='index.html'>C++ API</a></h3>
<br/>
</div>  
</div>

<div id="content">
<br/>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00256.html">frepple</a>::<a class="el" href="a00257.html">utils</a>::<a class="el" href="a00184.html">XMLElement</a>
  </div>
</div>
<div class="contents">
<h1>frepple::utils::XMLElement Class Reference</h1><!-- doxytag: class="frepple::utils::XMLElement" --><!-- doxytag: inherits="frepple::utils::DataElement" -->
<p>This class represents an XML element being read in from the input file.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00252_source.html">utils.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for frepple::utils::XMLElement:</div>
<div class="dynsection">
<div class="center"><img src="a00652.png" border="0" usemap="#frepple_1_1utils_1_1_x_m_l_element_inherit__map" alt="Inheritance graph"/></div>
<map name="frepple_1_1utils_1_1_x_m_l_element_inherit__map" id="frepple_1_1utils_1_1_x_m_l_element_inherit__map">
<area shape="rect" id="node2" href="a00047.html" title="This abstract class represents a attribute and value pair for updating objects in..." alt="" coords="5,6,179,34"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00653.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a80b0d0a259ab9c7bc4ba3ff4d240926f">addData</a> (const char *pData, size_t len)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a7c89845913e521bf65492da574a7da40">getBool</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a9a0ef00c263e0f05890c77f20a697ac5">getData</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00049.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a9e12e0df03d446794c093c3088b3d686">getDate</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a132750cca9d5afbcd672f97de24970a3">getDouble</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a5e0097d54ae4fa2d7fc84fd55ab918fb">getInt</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a293ca6928e1535f0a9db72dacde49732">getLong</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a756c40f444b3dba33f1fe129cebf6bba">getString</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00179.html">TimePeriod</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#aa26d5c05fa8498c774560985fe54ba95">getTimeperiod</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a65dd9aa3b8f0b016fd9256aef2e68f5c">getUnsignedLong</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a06273b0ffb0c85d46e6c303996bda330">operator bool</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a42aeaf1d784615a25bb751ff9aa9844e">reset</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a7ce579b686caae3f0ebfa47095883576">setData</a> (const char *pData)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a5a592c49dbff688c6d5ce624396c7072">XMLElement</a> (const string &amp;v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#a75ab6317a28028e8edaa086a89002f51">XMLElement</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00184.html#ac40159230930a88fe7a0eda827f58280">~XMLElement</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class represents an XML element being read in from the input file. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02700">2700</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a75ab6317a28028e8edaa086a89002f51"></a><!-- doxytag: member="frepple::utils::XMLElement::XMLElement" ref="a75ab6317a28028e8edaa086a89002f51" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::XMLElement::XMLElement </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Default constructor. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02710">2710</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5a592c49dbff688c6d5ce624396c7072"></a><!-- doxytag: member="frepple::utils::XMLElement::XMLElement" ref="a5a592c49dbff688c6d5ce624396c7072" args="(const string &amp;v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::XMLElement::XMLElement </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>v</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02713">2713</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac40159230930a88fe7a0eda827f58280"></a><!-- doxytag: member="frepple::utils::XMLElement::~XMLElement" ref="ac40159230930a88fe7a0eda827f58280" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual frepple::utils::XMLElement::~XMLElement </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02716">2716</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a80b0d0a259ab9c7bc4ba3ff4d240926f"></a><!-- doxytag: member="frepple::utils::XMLElement::addData" ref="a80b0d0a259ab9c7bc4ba3ff4d240926f" args="(const char *pData, size_t len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void frepple::utils::XMLElement::addData </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add some characters to this data field of this element.<br/>
 The second argument is the number of bytes, not the number of characters. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02728">2728</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7c89845913e521bf65492da574a7da40"></a><!-- doxytag: member="frepple::utils::XMLElement::getBool" ref="a7c89845913e521bf65492da574a7da40" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool frepple::utils::XMLElement::getBool </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Interprets the element as a boolean value.<br/>
 </p>
<p>Our implementation is a bit more generous and forgiving than the boolean datatype that is part of the XML schema v2 standard. The standard expects the following literals:<br/>
 {true, false, 1, 0} </p>
<p>Our implementation uses only the first charater of the text, and is case insensitive. It thus matches a wider range of values:<br/>
 {t.*, T.*, f.*, F.*, 1.*, 0.*} </p>

<p>Reimplemented from <a class="el" href="a00047.html#a542b814710b3242bd4c81aad2fc269d8">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00255_source.html#l00651">651</a> of file <a class="el" href="a00255_source.html">xmlparser.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9a0ef00c263e0f05890c77f20a697ac5"></a><!-- doxytag: member="frepple::utils::XMLElement::getData" ref="a9a0ef00c263e0f05890c77f20a697ac5" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* frepple::utils::XMLElement::getData </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the data field. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02734">2734</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9e12e0df03d446794c093c3088b3d686"></a><!-- doxytag: member="frepple::utils::XMLElement::getDate" ref="a9e12e0df03d446794c093c3088b3d686" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="a00049.html">Date</a> frepple::utils::XMLElement::getDate </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#abe8c2019e5f79328a6a1fa1f3bb4bbae">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02746">2746</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a132750cca9d5afbcd672f97de24970a3"></a><!-- doxytag: member="frepple::utils::XMLElement::getDouble" ref="a132750cca9d5afbcd672f97de24970a3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double frepple::utils::XMLElement::getDouble </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#a88f1178689f984215c4bef4eb5a0d5d9">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02744">2744</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5e0097d54ae4fa2d7fc84fd55ab918fb"></a><!-- doxytag: member="frepple::utils::XMLElement::getInt" ref="a5e0097d54ae4fa2d7fc84fd55ab918fb" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int frepple::utils::XMLElement::getInt </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#a0d8c973cc584400f5ea5d8acfd82ace2">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02742">2742</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a293ca6928e1535f0a9db72dacde49732"></a><!-- doxytag: member="frepple::utils::XMLElement::getLong" ref="a293ca6928e1535f0a9db72dacde49732" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual long frepple::utils::XMLElement::getLong </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#a83702db7d4cc34ee86a65d45a0f86499">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02736">2736</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a756c40f444b3dba33f1fe129cebf6bba"></a><!-- doxytag: member="frepple::utils::XMLElement::getString" ref="a756c40f444b3dba33f1fe129cebf6bba" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual string frepple::utils::XMLElement::getString </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the string value of the XML data. The xerces library takes care of appropriately unescaping special character sequences. </p>

<p>Reimplemented from <a class="el" href="a00047.html#a053aa4cde35b21a399f26bca0132ab3f">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02750">2750</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa26d5c05fa8498c774560985fe54ba95"></a><!-- doxytag: member="frepple::utils::XMLElement::getTimeperiod" ref="aa26d5c05fa8498c774560985fe54ba95" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="a00179.html">TimePeriod</a> frepple::utils::XMLElement::getTimeperiod </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#a41d128a13b3037cba281931330f7bdc1">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02740">2740</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a65dd9aa3b8f0b016fd9256aef2e68f5c"></a><!-- doxytag: member="frepple::utils::XMLElement::getUnsignedLong" ref="a65dd9aa3b8f0b016fd9256aef2e68f5c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual unsigned long frepple::utils::XMLElement::getUnsignedLong </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#a5c309a5660770ea024a6ae6057d71c28">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02738">2738</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a06273b0ffb0c85d46e6c303996bda330"></a><!-- doxytag: member="frepple::utils::XMLElement::operator bool" ref="a06273b0ffb0c85d46e6c303996bda330" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual frepple::utils::XMLElement::operator bool </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented from <a class="el" href="a00047.html#a5d1bff4aa243bd0117dafc16d6b021ca">frepple::utils::DataElement</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02707">2707</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a42aeaf1d784615a25bb751ff9aa9844e"></a><!-- doxytag: member="frepple::utils::XMLElement::reset" ref="a42aeaf1d784615a25bb751ff9aa9844e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void frepple::utils::XMLElement::reset </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Re-initializes an existing element. Using this method we can avoid destroying and recreating XMLelement objects too frequently. Instead we can manage them in a array. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02722">2722</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7ce579b686caae3f0ebfa47095883576"></a><!-- doxytag: member="frepple::utils::XMLElement::setData" ref="a7ce579b686caae3f0ebfa47095883576" args="(const char *pData)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void frepple::utils::XMLElement::setData </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pData</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the data value of this element. </p>

<p>Definition at line <a class="el" href="a00252_source.html#l02731">2731</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a00252_source.html">utils.h</a></li>
<li><a class="el" href="a00255_source.html">xmlparser.cpp</a></li>
</ul>
</div>
<hr size="1"/><address style="align: right;"><small>Documentation generated for frePPLe by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"/></a></small></address>
</div>
</div>
</body>
</html>