<!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::XMLInputFile 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="a00187.html">XMLInputFile</a> </div> </div> <div class="contents"> <h1>frepple::utils::XMLInputFile Class Reference</h1><!-- doxytag: class="frepple::utils::XMLInputFile" --><!-- doxytag: inherits="frepple::utils::XMLInput" --> <p>This class reads XML data from a file system. <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::XMLInputFile:</div> <div class="dynsection"> <div class="center"><img src="a00657.png" border="0" usemap="#frepple_1_1utils_1_1_x_m_l_input_file_inherit__map" alt="Inheritance graph"/></div> <map name="frepple_1_1utils_1_1_x_m_l_input_file_inherit__map" id="frepple_1_1utils_1_1_x_m_l_input_file_inherit__map"> <area shape="rect" id="node2" href="a00186.html" title="This class will read in an XML-file and call the appropriate handler functions of..." alt="" coords="17,83,169,111"/> <area shape="rect" id="node4" href="a00119.html" title="Class NonCopyable is a base class. Derive your own class from it when you want to..." alt="" coords="5,6,181,34"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="a00658.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">string </td><td class="memItemRight" valign="bottom"><a class="el" href="a00187.html#a22bc948a8e8ebfc21aea1b1f16239d1d">getFileName</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00187.html#afc224c0a9ef00d577a7ea36fc7908583">parse</a> (<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="a00187.html#ae86cd740257866ca9bf64d6b20e99f32">setFileName</a> (const string &s)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00187.html#a1e8e7f055544787eec031cb109d74270">XMLInputFile</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00187.html#a1c2d07fc389d01a6e77b7ca3cc93ace5">XMLInputFile</a> (const string &s)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This class reads XML data from a file system. </p> <p>The filename argument can be the name of a file or a directory. If a directory is passed, all files with the extension ".xml" will be read from it. Subdirectories are not recursed. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04450">4450</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a1c2d07fc389d01a6e77b7ca3cc93ace5"></a><!-- doxytag: member="frepple::utils::XMLInputFile::XMLInputFile" ref="a1c2d07fc389d01a6e77b7ca3cc93ace5" args="(const string &s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">frepple::utils::XMLInputFile::XMLInputFile </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>s</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor. The argument passed is the name of a file or a directory. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04455">4455</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a1e8e7f055544787eec031cb109d74270"></a><!-- doxytag: member="frepple::utils::XMLInputFile::XMLInputFile" ref="a1e8e7f055544787eec031cb109d74270" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">frepple::utils::XMLInputFile::XMLInputFile </td> <td>(</td> <td class="paramname"></td> <td> ) </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#l04458">4458</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="a22bc948a8e8ebfc21aea1b1f16239d1d"></a><!-- doxytag: member="frepple::utils::XMLInputFile::getFileName" ref="a22bc948a8e8ebfc21aea1b1f16239d1d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string frepple::utils::XMLInputFile::getFileName </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the name of the file or directory to process. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04464">4464</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="afc224c0a9ef00d577a7ea36fc7908583"></a><!-- doxytag: member="frepple::utils::XMLInputFile::parse" ref="afc224c0a9ef00d577a7ea36fc7908583" args="(Object *, bool=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInputFile::parse </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><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Parse the specified file. When a directory was passed as the argument a failure is flagged as soon as a single file returned a failure. All files in an directory are processed however, regardless of failure with one of the files. </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>Generated in the following conditions:</p> <ul> <li>no input file or directory has been specified.</li> <li>read access to the input file is not available</li> <li>the program doesn't support reading directories on your platform </li> </ul> </td></tr> </table> </dd> </dl> <p>Reimplemented from <a class="el" href="a00186.html#afd8ccfb8f9fad2fe3d11ca07695afd15">frepple::utils::XMLInput</a>.</p> <p>Definition at line <a class="el" href="a00255_source.html#l00828">828</a> of file <a class="el" href="a00255_source.html">xmlparser.cpp</a>.</p> </div> </div> <a class="anchor" id="ae86cd740257866ca9bf64d6b20e99f32"></a><!-- doxytag: member="frepple::utils::XMLInputFile::setFileName" ref="ae86cd740257866ca9bf64d6b20e99f32" args="(const string &s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::XMLInputFile::setFileName </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>s</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Update the name of the file to be processed. </p> <p>Definition at line <a class="el" href="a00252_source.html#l04461">4461</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 <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>