<!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::XMLInput 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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class 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="a00186.html">XMLInput</a> </div> </div> <div class="contents"> <h1>frepple::utils::XMLInput Class Reference</h1><!-- doxytag: class="frepple::utils::XMLInput" --><!-- doxytag: inherits="frepple::utils::NonCopyable" --> <p>This class will read in an XML-file and call the appropriate handler functions of the <a class="el" href="a00120.html" title="Object is the abstract base class for the main entities.">Object</a> classes and objects. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="a00252_source.html">utils.h</a>></code></p> <div class="dynheader"> Inheritance diagram for frepple::utils::XMLInput:</div> <div class="dynsection"> <div class="center"><img src="a00655.png" border="0" usemap="#frepple_1_1utils_1_1_x_m_l_input_inherit__map" alt="Inheritance graph"/></div> <map name="frepple_1_1utils_1_1_x_m_l_input_inherit__map" id="frepple_1_1utils_1_1_x_m_l_input_inherit__map"> <area shape="rect" id="node5" href="a00187.html" title="This class reads XML data from a file system." alt="" coords="5,161,179,189"/> <area shape="rect" id="node7" href="a00188.html" title="This class reads XML data from a string." alt="" coords="203,161,389,189"/> <area shape="rect" id="node2" href="a00119.html" title="Class NonCopyable is a base class. Derive your own class from it when you want to..." alt="" coords="105,6,281,34"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="a00656.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef pair< <a class="el" href="a00002.html">Attribute</a>, <br class="typebreak"/> <a class="el" href="a00184.html">XMLElement</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a92b40b672353ee47b6f00334456cbce8">datapair</a></td></tr> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a0e289487730ec9fccb0b7c1485ae0613">getAbortOnDataError</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00003.html">AttributeList</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#adcc4751961526c0103536acd194d32a0">getAttributes</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00029.html">CommandList</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a962f667858f3f328c4a5585890285289">getCommands</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00186.html#a92b40b672353ee47b6f00334456cbce8">datapair</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#aa701e2cafff7e1642f625b28442c6211">getCurrentElement</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="a00186.html#a92b40b672353ee47b6f00334456cbce8">datapair</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a407522e9d0dde7f7eebfafe182d050cf">getParentElement</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00120.html">Object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a534e3cd30aaa91fc9303f6d22093cee6">getParentObject</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00120.html">Object</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a98008d76b6971b2592ee5ae6f0f03d4c">getPreviousObject</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a656f44229f4251a26773decd010caaaf">getUserArea</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#af1ffc5c65dd968dcb04a23e05a0da5ba">IgnoreElement</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a23ebdcfba82479d4cf56cf6aa4959899">invalidateCurrentObject</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a42fe5e4ae141efb84744b8a359e38bd9">isObjectEnd</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a37f5f9a68aaa954b1f1af1bcff692238">parse</a> (xercesc::InputSource &, <a class="el" href="a00120.html">Object</a> *, bool=false)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a88dd6be5af6fc605d2d420fbcb397b18">readto</a> (<a class="el" href="a00120.html">Object</a> *)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#acddf9ef79408ca0c59fcf9320d6271d2">setAbortOnDataError</a> (bool i)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#af76fa6f3fe40bd167a36b4ab859e0ff6">setUserArea</a> (void *v)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a317b61501fa05e518116d8e2a7f088f6">shutdown</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a16a0082d8fe4104ba7f0515fd7376620">XMLInput</a> (unsigned short maxNestedElmnts=20)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a0343509f37f1a5007842abaf223653db">~XMLInput</a> ()</td></tr> <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#a63f940f87e653fe0e85a7d686cab0b4e">executeCommands</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00186.html#afd8ccfb8f9fad2fe3d11ca07695afd15">parse</a> (<a class="el" href="a00120.html">Object</a> *s, bool b=false)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This class will read in an XML-file and call the appropriate handler functions of the <a class="el" href="a00120.html" title="Object is the abstract base class for the main entities.">Object</a> classes and objects. </p> <p>This class is implemented based on the Xerces SAX XML parser. For debugging purposes a flag is defined at the start of the file "xmlparser.cpp". Uncomment the line and recompile to use it.</p> <p>FrePPLe creates a new parser and loads the XML schema every time XML data need to be parsed. When this happens only a few times during a run this is good enough.<br/> However, when the libary has to parse plenty of small XML messages this will create a significant overhead. The code would need to be enhanced to maintain a pool of parsers and cache their grammars. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04134">4134</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> <hr/><h2>Member Typedef Documentation</h2> <a class="anchor" id="a92b40b672353ee47b6f00334456cbce8"></a><!-- doxytag: member="frepple::utils::XMLInput::datapair" ref="a92b40b672353ee47b6f00334456cbce8" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef pair<<a class="el" href="a00002.html">Attribute</a>,<a class="el" href="a00184.html">XMLElement</a>> <a class="el" href="a00186.html#a92b40b672353ee47b6f00334456cbce8">frepple::utils::XMLInput::datapair</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="a00252_source.html#l04137">4137</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a16a0082d8fe4104ba7f0515fd7376620"></a><!-- doxytag: member="frepple::utils::XMLInput::XMLInput" ref="a16a0082d8fe4104ba7f0515fd7376620" args="(unsigned short maxNestedElmnts=20)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">frepple::utils::XMLInput::XMLInput </td> <td>(</td> <td class="paramtype">unsigned short </td> <td class="paramname"> <em>maxNestedElmnts</em> = <code>20</code></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>maxNestedElmnts</em> </td><td>Defines the maximum depth of elements an XML document is allowed to have. The default is 20. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="a00252_source.html#l04285">4285</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a0343509f37f1a5007842abaf223653db"></a><!-- doxytag: member="frepple::utils::XMLInput::~XMLInput" ref="a0343509f37f1a5007842abaf223653db" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual frepple::utils::XMLInput::~XMLInput </td> <td>(</td> <td class="paramname"></td> <td> ) </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#l04291">4291</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="a63f940f87e653fe0e85a7d686cab0b4e"></a><!-- doxytag: member="frepple::utils::XMLInput::executeCommands" ref="a63f940f87e653fe0e85a7d686cab0b4e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::executeCommands </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Execute the commands that have been read from the input stream. </p> <p>Definition at line <a class="el" href="a00255_source.html#l00813">813</a> of file <a class="el" href="a00255_source.html">xmlparser.cpp</a>.</p> </div> </div> <a class="anchor" id="a0e289487730ec9fccb0b7c1485ae0613"></a><!-- doxytag: member="frepple::utils::XMLInput::getAbortOnDataError" ref="a0e289487730ec9fccb0b7c1485ae0613" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool frepple::utils::XMLInput::getAbortOnDataError </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the behavior of the parser in case of data errors.<br/> When true is returned, the processing of the XML stream continues after a <a class="el" href="a00048.html" title="An exception of this type is thrown when data errors are found.">DataException</a>. Other, more critical, exceptions types will still abort the parsing process.<br/> False indicates that the processing of the XML stream is aborted. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04385">4385</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="adcc4751961526c0103536acd194d32a0"></a><!-- doxytag: member="frepple::utils::XMLInput::getAttributes" ref="adcc4751961526c0103536acd194d32a0" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00003.html">AttributeList</a>& frepple::utils::XMLInput::getAttributes </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return a pointer to an array of character pointer which point to the attributes. See the xerces documentation if this description doesn't satisfy you... </p> <p>Definition at line <a class="el" href="a00252_source.html#l04297">4297</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a962f667858f3f328c4a5585890285289"></a><!-- doxytag: member="frepple::utils::XMLInput::getCommands" ref="a962f667858f3f328c4a5585890285289" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00029.html">CommandList</a>& frepple::utils::XMLInput::getCommands </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return a reference to the list of commands. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04388">4388</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="aa701e2cafff7e1642f625b28442c6211"></a><!-- doxytag: member="frepple::utils::XMLInput::getCurrentElement" ref="aa701e2cafff7e1642f625b28442c6211" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00186.html#a92b40b672353ee47b6f00334456cbce8">datapair</a>& frepple::utils::XMLInput::getCurrentElement </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns a reference to the current element. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04356">4356</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a407522e9d0dde7f7eebfafe182d050cf"></a><!-- doxytag: member="frepple::utils::XMLInput::getParentElement" ref="a407522e9d0dde7f7eebfafe182d050cf" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="a00186.html#a92b40b672353ee47b6f00334456cbce8">datapair</a>& frepple::utils::XMLInput::getParentElement </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns a reference to the parent element. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04352">4352</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a534e3cd30aaa91fc9303f6d22093cee6"></a><!-- doxytag: member="frepple::utils::XMLInput::getParentObject" ref="a534e3cd30aaa91fc9303f6d22093cee6" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00120.html">Object</a>* frepple::utils::XMLInput::getParentObject </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Clears the previously read object. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04345">4345</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a98008d76b6971b2592ee5ae6f0f03d4c"></a><!-- doxytag: member="frepple::utils::XMLInput::getPreviousObject" ref="a98008d76b6971b2592ee5ae6f0f03d4c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00120.html">Object</a>* frepple::utils::XMLInput::getPreviousObject </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Return a pointer to the previous object being read in.<br/> In a typical use the returned pointer will require a dynamic_cast to a subclass type.<br/> The typical usage is as follows: </p> <pre> <a class="el" href="a00121.html" title="An operation represents an activity: these consume and produce material, take time...">Operation</a> *o = dynamic_cast<Operation*>(pIn.getPreviousObject()); if (o) doSomeThing(o); else throw <a class="el" href="a00111.html" title="An exception of this type is thrown when the library gets in an inconsistent state...">LogicException</a>("Incorrect object type"); </pre> <p>Definition at line <a class="el" href="a00252_source.html#l04342">4342</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a656f44229f4251a26773decd010caaaf"></a><!-- doxytag: member="frepple::utils::XMLInput::getUserArea" ref="a656f44229f4251a26773decd010caaaf" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* frepple::utils::XMLInput::getUserArea </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the user definable pointer. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04372">4372</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="af1ffc5c65dd968dcb04a23e05a0da5ba"></a><!-- doxytag: member="frepple::utils::XMLInput::IgnoreElement" ref="af1ffc5c65dd968dcb04a23e05a0da5ba" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::IgnoreElement </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Ignore an element. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04316">4316</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a23ebdcfba82479d4cf56cf6aa4959899"></a><!-- doxytag: member="frepple::utils::XMLInput::invalidateCurrentObject" ref="a23ebdcfba82479d4cf56cf6aa4959899" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::invalidateCurrentObject </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Invalidates the current object.<br/> This method is useful when, for instance, the object being parsed is being deleted. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04326">4326</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a42fe5e4ae141efb84744b8a359e38bd9"></a><!-- doxytag: member="frepple::utils::XMLInput::isObjectEnd" ref="a42fe5e4ae141efb84744b8a359e38bd9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool frepple::utils::XMLInput::isObjectEnd </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns true if the current object is finishing with the current tag. This method should only be used in the endElement() method. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04320">4320</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="afd8ccfb8f9fad2fe3d11ca07695afd15"></a><!-- doxytag: member="frepple::utils::XMLInput::parse" ref="afd8ccfb8f9fad2fe3d11ca07695afd15" args="(Object *s, bool b=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void frepple::utils::XMLInput::parse </td> <td>(</td> <td class="paramtype"><a class="el" href="a00120.html">Object</a> * </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>b</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline, protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>The real parsing job is delegated to subclasses. Subclass can then define the specifics for parsing a flat file, a string, a SOAP message, etc... </p> <dl><dt><b>Exceptions:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="a00162.html" title="An exception of this type is thrown when the library runs into problems that are...">RuntimeException</a></em> </td><td>Thrown in the following situations:</p> <ul> <li>the xml-document is incorrectly formatted</li> <li>the xml-parser librabry can't be initialized</li> <li>no memory can be allocated to the xml-parser </li> </ul> </td></tr> <tr><td valign="top"></td><td valign="top"><em><a class="el" href="a00048.html" title="An exception of this type is thrown when data errors are found.">DataException</a></em> </td><td>Thrown when the data can't be processed normally by the objects being created or updated. </td></tr> </table> </dd> </dl> <p>Reimplemented in <a class="el" href="a00188.html#aa3a20e2c5691d96a2a8b77717f39a877">frepple::utils::XMLInputString</a>, and <a class="el" href="a00187.html#afc224c0a9ef00d577a7ea36fc7908583">frepple::utils::XMLInputFile</a>.</p> <p>Definition at line <a class="el" href="a00252_source.html#l04401">4401</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a37f5f9a68aaa954b1f1af1bcff692238"></a><!-- doxytag: member="frepple::utils::XMLInput::parse" ref="a37f5f9a68aaa954b1f1af1bcff692238" args="(xercesc::InputSource &, Object *, bool=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::parse </td> <td>(</td> <td class="paramtype">xercesc::InputSource & </td> <td class="paramname"> <em>in</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00120.html">Object</a> * </td> <td class="paramname"> <em>pRoot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>validate</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>This is the core parsing function, which triggers the XML parser to start processing the input. It is normally called from the method parse(Object*) once a proper stream has been created. </p> <dl class="see"><dt><b>See also:</b></dt><dd>parse(Object*) </dd></dl> <p>Definition at line <a class="el" href="a00255_source.html#l00448">448</a> of file <a class="el" href="a00255_source.html">xmlparser.cpp</a>.</p> </div> </div> <a class="anchor" id="a88dd6be5af6fc605d2d420fbcb397b18"></a><!-- doxytag: member="frepple::utils::XMLInput::readto" ref="a88dd6be5af6fc605d2d420fbcb397b18" args="(Object *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::readto </td> <td>(</td> <td class="paramtype"><a class="el" href="a00120.html">Object</a> * </td> <td class="paramname"> <em>pPI</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Redirect event stream into a new <a class="el" href="a00120.html" title="Object is the abstract base class for the main entities.">Object</a>.<br/> It is also possible to pass a NULL pointer to the function. In that situation, we simple ignore the content of that element.<br/> Important: The user is reponsible of making sure the argument object has a proper write-lock. The release of that lock is handled by the parser. </p> <p>Definition at line <a class="el" href="a00255_source.html#l00344">344</a> of file <a class="el" href="a00255_source.html">xmlparser.cpp</a>.</p> </div> </div> <a class="anchor" id="acddf9ef79408ca0c59fcf9320d6271d2"></a><!-- doxytag: member="frepple::utils::XMLInput::setAbortOnDataError" ref="acddf9ef79408ca0c59fcf9320d6271d2" args="(bool i)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::setAbortOnDataError </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"> <em>i</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Updates whether we ignore data exceptions or whether we abort the processing of the XML data stream. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04377">4377</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="af76fa6f3fe40bd167a36b4ab859e0ff6"></a><!-- doxytag: member="frepple::utils::XMLInput::setUserArea" ref="af76fa6f3fe40bd167a36b4ab859e0ff6" args="(void *v)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::setUserArea </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>v</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Updates the user definable pointer. This pointer is used to store status information between handler calls. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04368">4368</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a317b61501fa05e518116d8e2a7f088f6"></a><!-- doxytag: member="frepple::utils::XMLInput::shutdown" ref="a317b61501fa05e518116d8e2a7f088f6" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInput::shutdown </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Abort the parsing. The actual shutdown cannot be called inside a SAX handler function, so actual shutdown is deferred until the next iteration of the feed loop. </p> <p>Definition at line <a class="el" href="a00255_source.html#l00371">371</a> of file <a class="el" href="a00255_source.html">xmlparser.cpp</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 <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>