<!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::Environment 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="a00057.html">Environment</a> </div> </div> <div class="contents"> <h1>frepple::utils::Environment Class Reference</h1><!-- doxytag: class="frepple::utils::Environment" --> <p>This class groups some functions used to interact with the operating system environment. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="a00252_source.html">utils.h</a>></code></p> <p><a href="a00574.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static const string & </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a44daca441de5291c8f932c9e12d4e142">getLogFile</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a86401488650644f79f4ff809f82e8d09">getProcessors</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static string </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a1a07e3b3c5fd07dd2efbe7d546e3bd0e">searchFile</a> (const string)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a10599f07763dca5b794b47d7f64f03f1">setLogFile</a> (const string &x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00057.html#a2e77491e9f8ce70fbf055217655460af">setProcessors</a> (int i)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This class groups some functions used to interact with the operating system environment. </p> <p>It handles:</p> <ul> <li>The location of the configuration files.</li> <li>The maximum number of processors / threads to be used by frePPLe.</li> <li>An output stream for logging all output. </li> </ul> <p>Definition at line <a class="el" href="a00252_source.html#l00470">470</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a44daca441de5291c8f932c9e12d4e142"></a><!-- doxytag: member="frepple::utils::Environment::getLogFile" ref="a44daca441de5291c8f932c9e12d4e142" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static const string& frepple::utils::Environment::getLogFile </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the name of the logfile. </p> <p>Definition at line <a class="el" href="a00252_source.html#l00505">505</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a86401488650644f79f4ff809f82e8d09"></a><!-- doxytag: member="frepple::utils::Environment::getProcessors" ref="a86401488650644f79f4ff809f82e8d09" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int frepple::utils::Environment::getProcessors </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the number of processors on your machine. </p> <p>Definition at line <a class="el" href="a00252_source.html#l00499">499</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p> </div> </div> <a class="anchor" id="a1a07e3b3c5fd07dd2efbe7d546e3bd0e"></a><!-- doxytag: member="frepple::utils::Environment::searchFile" ref="a1a07e3b3c5fd07dd2efbe7d546e3bd0e" args="(const string)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string frepple::utils::Environment::searchFile </td> <td>(</td> <td class="paramtype">const string </td> <td class="paramname"> <em>filename</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Search for a file with a given name.<br/> The following directories are searched in sequence to find a match:</p> <ul> <li>The current directory.</li> <li>The directory reffered to by the variable FREPPLE_HOME, if it is defined.</li> <li>The data directory as configured during the compilation. This applies only to linux / unix.</li> <li>The library directory as configured during the compilation. This applies only to linux / unix. </li> </ul> <p>Definition at line <a class="el" href="a00211_source.html#l00069">69</a> of file <a class="el" href="a00211_source.html">utils/library.cpp</a>.</p> </div> </div> <a class="anchor" id="a10599f07763dca5b794b47d7f64f03f1"></a><!-- doxytag: member="frepple::utils::Environment::setLogFile" ref="a10599f07763dca5b794b47d7f64f03f1" args="(const string &x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void frepple::utils::Environment::setLogFile </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Updates the filename for logging error messages and warnings. The file is also opened for writing and the standard output and standard error output streams are redirected to it.<br/> If the filename starts with '+' the log file is appended to instead of being overwritten. </p> <p>Definition at line <a class="el" href="a00211_source.html#l00125">125</a> of file <a class="el" href="a00211_source.html">utils/library.cpp</a>.</p> </div> </div> <a class="anchor" id="a2e77491e9f8ce70fbf055217655460af"></a><!-- doxytag: member="frepple::utils::Environment::setProcessors" ref="a2e77491e9f8ce70fbf055217655460af" args="(int i)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void frepple::utils::Environment::setProcessors </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em></td> <td> ) </td> <td><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Updates the number of processors available on your machine. </p> <p>Definition at line <a class="el" href="a00252_source.html#l00502">502</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="a00211_source.html">utils/library.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>