Sophie

Sophie

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

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::PythonObject 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="a00154.html">PythonObject</a>
  </div>
</div>
<div class="contents">
<h1>frepple::utils::PythonObject Class Reference</h1><!-- doxytag: class="frepple::utils::PythonObject" --><!-- doxytag: inherits="frepple::utils::DataElement" -->
<p>This class handles two-way translation between the data types in C++ and Python.  
<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::PythonObject:</div>
<div class="dynsection">
<div class="center"><img src="a00621.png" border="0" usemap="#frepple_1_1utils_1_1_python_object_inherit__map" alt="Inheritance graph"/></div>
<map name="frepple_1_1utils_1_1_python_object_inherit__map" id="frepple_1_1utils_1_1_python_object_inherit__map">
<area shape="rect" id="node5" href="a00152.html" title="This call is a wrapper around a Python function that can be called from the C++ code..." alt="" coords="5,161,195,189"/>
<area shape="rect" id="node2" href="a00047.html" title="This abstract class represents a attribute and value pair for updating objects in..." alt="" coords="13,6,187,34"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00622.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">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a1aa6a226c7c6d20c89609077e1dbab65">check</a> (const <a class="el" href="a00155.html">PythonType</a> &amp;c) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#aa5f7a25056671e8df629cd42b0061b28">check</a> (const <a class="el" href="a00115.html">MetaClass</a> *c) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a804b478fb76759d334882ee468fc84f9">getBool</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00049.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#aa72c83cab5f89f71aff63f0bfad26bd1">getDate</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#ad292e9b75b65eef65ff8701939ab348a">getDouble</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a783ec10f02cad37886df55bc3f08ba5e">getInt</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#abc8f089aece0ce2ce8abc25a09a453f6">getLong</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a471bd4797fe735e12a1f485e05fc5940">getString</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00179.html">TimePeriod</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a8add60e92982666a4a13b499d9c74d58">getTimeperiod</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a75a17a5715cec17bba52cc94b786491e">getUnsignedLong</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a0678453851ef002c5890e958d31ebd94">operator bool</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a3aff1c5d3928869b5f977af143822765">operator PyObject *</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00154.html">PythonObject</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a7722d583f48f6213f482c7ce878dae94">operator=</a> (const <a class="el" href="a00154.html">PythonObject</a> &amp;o)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#ae38fbdc666575d4a993b54fad78ea0ce">PythonObject</a> (const <a class="el" href="a00049.html">Date</a> &amp;val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a242815c8cdf19ce6487dae5b439a027e">PythonObject</a> (const <a class="el" href="a00179.html">TimePeriod</a> val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a6e9ee3f9d29eb2176c613473a7c064b8">PythonObject</a> (const bool val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a2d50e3ecddd448cd4095128d10bdf861">PythonObject</a> (const unsigned long val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#ac790455a612744f6c28c71b9d1a2eeae">PythonObject</a> (const long val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#adf7b19c1c83239254a4dcd988c7ea156">PythonObject</a> (const int val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#aaf58d76373bf4d7f69e9116af430d026">PythonObject</a> (const double val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a10b830e496885afaab1ea5c82fb35d7a">PythonObject</a> (const string &amp;val)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a8ede2f04e7b0fe54cc8f08cca9048355">PythonObject</a> (<a class="el" href="a00120.html">Object</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a1782151c5b868c2e64325da00b956989">PythonObject</a> (const PyObject *o)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00154.html#a7f228cd4812a5a47cef913fe964a3bfd">PythonObject</a> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class handles two-way translation between the data types in C++ and Python. </p>
<p>This class is basically a wrapper around a PyObject pointer.</p>
<p>When creating a <a class="el" href="a00154.html" title="This class handles two-way translation between the data types in C++ and Python.">PythonObject</a> from a C++ object, make sure to increment the reference count of the object.<br/>
 When constructing a <a class="el" href="a00154.html" title="This class handles two-way translation between the data types in C++ and Python.">PythonObject</a> from an existing Python object, the code that provided us the PyObject pointer should have incremented the reference count already.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02787">2787</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="a7f228cd4812a5a47cef913fe964a3bfd"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a7f228cd4812a5a47cef913fe964a3bfd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Default constructor. The default value is equal to Py_None. </p>

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

</div>
</div>
<a class="anchor" id="a1782151c5b868c2e64325da00b956989"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a1782151c5b868c2e64325da00b956989" args="(const PyObject *o)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const PyObject *&nbsp;</td>
          <td class="paramname"> <em>o</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor from an existing Python object.<br/>
 The reference count isn't increased. </p>

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

</div>
</div>
<a class="anchor" id="a8ede2f04e7b0fe54cc8f08cca9048355"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a8ede2f04e7b0fe54cc8f08cca9048355" args="(Object *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00120.html">Object</a> *&nbsp;</td>
          <td class="paramname"> <em>p</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor from a pointer to an <a class="el" href="a00120.html" title="Object is the abstract base class for the main entities.">Object</a>.<br/>
 The metadata of the <a class="el" href="a00120.html" title="Object is the abstract base class for the main entities.">Object</a> instances allow us to create a Python object that works as a proxy for the C++ object. </p>

<p>Definition at line <a class="el" href="a00233_source.html#l00429">429</a> of file <a class="el" href="a00233_source.html">pythonutils.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a10b830e496885afaab1ea5c82fb35d7a"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a10b830e496885afaab1ea5c82fb35d7a" args="(const string &amp;val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a C++ string into a (raw) Python string. </p>

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

</div>
</div>
<a class="anchor" id="aaf58d76373bf4d7f69e9116af430d026"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="aaf58d76373bf4d7f69e9116af430d026" args="(const double val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const double&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a C++ double into a Python number. </p>

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

</div>
</div>
<a class="anchor" id="adf7b19c1c83239254a4dcd988c7ea156"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="adf7b19c1c83239254a4dcd988c7ea156" args="(const int val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const int&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a C++ integer into a Python integer. </p>

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

</div>
</div>
<a class="anchor" id="ac790455a612744f6c28c71b9d1a2eeae"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="ac790455a612744f6c28c71b9d1a2eeae" args="(const long val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const long&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a C++ long into a Python long. </p>

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

</div>
</div>
<a class="anchor" id="a2d50e3ecddd448cd4095128d10bdf861"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a2d50e3ecddd448cd4095128d10bdf861" args="(const unsigned long val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const unsigned long&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a C++ unsigned long into a Python long. </p>

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

</div>
</div>
<a class="anchor" id="a6e9ee3f9d29eb2176c613473a7c064b8"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a6e9ee3f9d29eb2176c613473a7c064b8" args="(const bool val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const bool&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a C++ boolean into a Python boolean. </p>

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

</div>
</div>
<a class="anchor" id="a242815c8cdf19ce6487dae5b439a027e"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="a242815c8cdf19ce6487dae5b439a027e" args="(const TimePeriod val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00179.html">TimePeriod</a>&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a frePPLe <a class="el" href="a00179.html" title="This class represents a time duration with an accuracy of one second.">TimePeriod</a> into a Python number representing the number of seconds. </p>

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

</div>
</div>
<a class="anchor" id="ae38fbdc666575d4a993b54fad78ea0ce"></a><!-- doxytag: member="frepple::utils::PythonObject::PythonObject" ref="ae38fbdc666575d4a993b54fad78ea0ce" args="(const Date &amp;val)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::PythonObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00049.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>val</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a frePPLe date into a Python datetime.datetime object. </p>

<p>Definition at line <a class="el" href="a00233_source.html#l00372">372</a> of file <a class="el" href="a00233_source.html">pythonutils.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1aa6a226c7c6d20c89609077e1dbab65"></a><!-- doxytag: member="frepple::utils::PythonObject::check" ref="a1aa6a226c7c6d20c89609077e1dbab65" args="(const PythonType &amp;c) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool frepple::utils::PythonObject::check </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00155.html">PythonType</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check whether the Python object is of a certain type.<br/>
 Subclasses of the argument type will also give a true return value. </p>

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

</div>
</div>
<a class="anchor" id="aa5f7a25056671e8df629cd42b0061b28"></a><!-- doxytag: member="frepple::utils::PythonObject::check" ref="aa5f7a25056671e8df629cd42b0061b28" args="(const MetaClass *c) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool frepple::utils::PythonObject::check </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00115.html">MetaClass</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check whether the Python object is of a certain type.<br/>
 Subclasses of the argument type will also give a true return value. </p>

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

</div>
</div>
<a class="anchor" id="a804b478fb76759d334882ee468fc84f9"></a><!-- doxytag: member="frepple::utils::PythonObject::getBool" ref="a804b478fb76759d334882ee468fc84f9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool frepple::utils::PythonObject::getBool </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>Convert a Python number into a C++ bool. </p>

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

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

</div>
</div>
<a class="anchor" id="aa72c83cab5f89f71aff63f0bfad26bd1"></a><!-- doxytag: member="frepple::utils::PythonObject::getDate" ref="aa72c83cab5f89f71aff63f0bfad26bd1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00049.html">Date</a> frepple::utils::PythonObject::getDate </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert a Python datetime.date or datetime.datetime object into a frePPLe date. </p>

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

<p>Definition at line <a class="el" href="a00233_source.html#l00394">394</a> of file <a class="el" href="a00233_source.html">pythonutils.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ad292e9b75b65eef65ff8701939ab348a"></a><!-- doxytag: member="frepple::utils::PythonObject::getDouble" ref="ad292e9b75b65eef65ff8701939ab348a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double frepple::utils::PythonObject::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>Convert a Python number or string into a C++ double. </p>

<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#l02872">2872</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a783ec10f02cad37886df55bc3f08ba5e"></a><!-- doxytag: member="frepple::utils::PythonObject::getInt" ref="a783ec10f02cad37886df55bc3f08ba5e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int frepple::utils::PythonObject::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>Convert a Python number or string into a C++ integer. </p>

<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#l02887">2887</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="abc8f089aece0ce2ce8abc25a09a453f6"></a><!-- doxytag: member="frepple::utils::PythonObject::getLong" ref="abc8f089aece0ce2ce8abc25a09a453f6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long frepple::utils::PythonObject::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>Convert a Python number into a C++ long. </p>

<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#l02906">2906</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a471bd4797fe735e12a1f485e05fc5940"></a><!-- doxytag: member="frepple::utils::PythonObject::getString" ref="a471bd4797fe735e12a1f485e05fc5940" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string frepple::utils::PythonObject::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>Convert a Python string into a C++ string. </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#l02838">2838</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8add60e92982666a4a13b499d9c74d58"></a><!-- doxytag: member="frepple::utils::PythonObject::getTimeperiod" ref="a8add60e92982666a4a13b499d9c74d58" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00179.html">TimePeriod</a> frepple::utils::PythonObject::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>Convert a Python number as a number of seconds into a frePPLe <a class="el" href="a00179.html" title="This class represents a time duration with an accuracy of one second.">TimePeriod</a>.<br/>
 A <a class="el" href="a00179.html" title="This class represents a time duration with an accuracy of one second.">TimePeriod</a> is represented as a number of seconds in Python. </p>

<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#l02934">2934</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a75a17a5715cec17bba52cc94b786491e"></a><!-- doxytag: member="frepple::utils::PythonObject::getUnsignedLong" ref="a75a17a5715cec17bba52cc94b786491e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long frepple::utils::PythonObject::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>Extract an unsigned long from the Python object. </p>

<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#l02851">2851</a> of file <a class="el" href="a00252_source.html">utils.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0678453851ef002c5890e958d31ebd94"></a><!-- doxytag: member="frepple::utils::PythonObject::operator bool" ref="a0678453851ef002c5890e958d31ebd94" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::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>Check for null value. </p>

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

<p>Reimplemented in <a class="el" href="a00152.html#ae41c2b578bf9253de49ac31b7f5145cb">frepple::utils::PythonFunction</a>.</p>

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

</div>
</div>
<a class="anchor" id="a3aff1c5d3928869b5f977af143822765"></a><!-- doxytag: member="frepple::utils::PythonObject::operator PyObject *" ref="a3aff1c5d3928869b5f977af143822765" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">frepple::utils::PythonObject::operator PyObject * </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This conversion operator casts the object back to a PyObject pointer. </p>

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

</div>
</div>
<a class="anchor" id="a7722d583f48f6213f482c7ce878dae94"></a><!-- doxytag: member="frepple::utils::PythonObject::operator=" ref="a7722d583f48f6213f482c7ce878dae94" args="(const PythonObject &amp;o)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00154.html">PythonObject</a>&amp; frepple::utils::PythonObject::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00154.html">PythonObject</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>o</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Assignment operator. </p>

<p>Reimplemented in <a class="el" href="a00152.html#a399b628a71ebec343a1ac01df9e9056d">frepple::utils::PythonFunction</a>.</p>

<p>Definition at line <a class="el" href="a00252_source.html#l02809">2809</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="a00233_source.html">pythonutils.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>