Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > eebc325dc36bd6e3b09b9b45133e42f8 > files > 3819

HippoDraw-devel-docs-1.21.1-10.fc13.i686.rpm

<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>HippoDraw Class Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="hippoApp.ico">
</head><body>
<!-- Generated by Doxygen 1.6.2 -->
<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><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><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="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_bd46360b4c6a7cd846adf95fa79d46e4.html">python</a>
  </div>
</div>
<div class="contents">
<h1>export_ListTuple.cxx</h1><a href="export__ListTuple_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="comment">// nonstandard extension used &#39;extern&#39; before...</span>
<a name="l00014"></a>00014 <span class="preprocessor"># pragma warning(disable:4231)  </span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="comment">// needs to have dll-interface used by client</span>
<a name="l00017"></a>00017 <span class="preprocessor"># pragma warning(disable:4251)  </span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <span class="comment">// non dll-interface struct</span>
<a name="l00020"></a>00020 <span class="preprocessor"># pragma warning(disable:4275)  </span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00022"></a>00022 <span class="comment">// &#39;int&#39; : forcing value to bool &#39;true&#39; or &#39;false&#39; (performance warning)</span>
<a name="l00023"></a>00023 <span class="preprocessor"># pragma warning(disable:4800)  </span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="comment">// include first to avoid _POSIX_C_SOURCE warning.</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;boost/python.hpp&gt;</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="ListTuple_8h.html" title="hippodraw::ListTuple class interface.">ListTuple.h</a>&quot;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">using namespace </span>boost::python;
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">namespace </span>hippodraw {
<a name="l00034"></a>00034 <span class="keyword">namespace </span>Python {
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="keywordtype">void</span>
<a name="l00037"></a>00037 <a class="code" href="namespacehippodraw_1_1Python.html#a6714139928f5508abc6f9da18a4d1dcb" title="Exports the ListTuple class to Python.">export_ListTuple</a>()
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039   class_ &lt; ListTuple, bases &lt; DataSource &gt; &gt;
<a name="l00040"></a>00040     ( <span class="stringliteral">&quot;ListTuple&quot;</span>,
<a name="l00041"></a>00041       <span class="stringliteral">&quot;A derived class from DataSource containing columns as references to\n&quot;</span>
<a name="l00042"></a>00042       <span class="stringliteral">&quot;Python list objects.  This allows the data to be used without making\n&quot;</span>
<a name="l00043"></a>00043       <span class="stringliteral">&quot;a copy of it.   However, access to the data is slower than for most\n&quot;</span>
<a name="l00044"></a>00044       <span class="stringliteral">&quot;of the other classes derived from DataSource&quot;</span>,
<a name="l00045"></a>00045       init&lt; &gt;
<a name="l00046"></a>00046       ( <span class="stringliteral">&quot;ListTuple ( None ) -&gt; ListTuple\n&quot;</span>
<a name="l00047"></a>00047         <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00048"></a>00048         <span class="stringliteral">&quot;Creates an empty ListTuple&quot;</span> ) )
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="comment">//     .add_property ( &quot;rows&quot;, &amp;ListTuple::rows )</span>
<a name="l00051"></a>00051 
<a name="l00052"></a>00052     .def ( <span class="stringliteral">&quot;setLabels&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1DataSource.html#a4d4664fa50e3299863ecba81e224aaa6" title="Assigns the label to each column from the vector of strings @ v.">ListTuple::setLabels</a>,
<a name="l00053"></a>00053            <span class="stringliteral">&quot;setLabels ( list or tuple ) -&gt; None\n&quot;</span>
<a name="l00054"></a>00054            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00055"></a>00055            <span class="stringliteral">&quot;Sets the labels of the columns from list of string objects.\n&quot;</span>
<a name="l00056"></a>00056            <span class="stringliteral">&quot;For an empty ListTuple object, implicitly sets the number of\n&quot;</span>
<a name="l00057"></a>00057            <span class="stringliteral">&quot;columns.&quot;</span> )
<a name="l00058"></a>00058 
<a name="l00059"></a>00059     .def ( <span class="stringliteral">&quot;getLabel&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1DataSource.html#a6b278c3842e10222f95bf0adf3973285" title="Returns the label for the column at index index.">ListTuple::getLabelAt</a>,
<a name="l00060"></a>00060            return_value_policy &lt; copy_const_reference &gt; (),
<a name="l00061"></a>00061            <span class="stringliteral">&quot;getLabel ( index ) -&gt; string\n&quot;</span>
<a name="l00062"></a>00062            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00063"></a>00063            <span class="stringliteral">&quot;Returns label of column.&quot;</span> )
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="comment">//     .def ( &quot;getLabels&quot;, &amp;ListTuple::getLabels,</span>
<a name="l00066"></a>00066 <span class="comment">//         return_value_policy &lt; copy_const_reference &gt; () )</span>
<a name="l00067"></a>00067 
<a name="l00068"></a>00068     .def ( <span class="stringliteral">&quot;addColumn&quot;</span>, 
<a name="l00069"></a>00069            &amp;<a class="code" href="classhippodraw_1_1ListTuple.html#a7f2913d71b204828f7d3b0ae1b6d384c" title="Adds a column to the end of the ListTuple.">ListTuple::addColumn</a>,
<a name="l00070"></a>00070            with_custodian_and_ward &lt; 1, 2 &gt; (),
<a name="l00071"></a>00071            <span class="stringliteral">&quot;addColumn ( string, list ) -&gt; value\n&quot;</span>
<a name="l00072"></a>00072            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00073"></a>00073            <span class="stringliteral">&quot;Adds the array as a new column with label from the string.\n&quot;</span>
<a name="l00074"></a>00074            <span class="stringliteral">&quot;Returns the index of the new column.&quot;</span>  )
<a name="l00075"></a>00075 
<a name="l00076"></a>00076     .def ( <span class="stringliteral">&quot;replaceColumn&quot;</span>,
<a name="l00077"></a>00077            ( <span class="keywordtype">void</span> ( ListTuple:: * ) <span class="comment">//function pointer</span>
<a name="l00078"></a>00078              ( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a class="code" href="classboost_1_1python_1_1list.html" title="A wrapper class for Python list objects.">boost::python::list</a> ) ) <span class="comment">// signature</span>
<a name="l00079"></a>00079            &amp;<a class="code" href="classhippodraw_1_1ListTuple.html#a19ff5a6871a105b2e45b38fa0ff243e2" title="Replaces the column indexed by index with the array.">ListTuple::replaceColumn</a>,
<a name="l00080"></a>00080            with_custodian_and_ward &lt; 1, 2 &gt; (),
<a name="l00081"></a>00081            <span class="stringliteral">&quot;replaceColumn ( index, list ) -&gt; None\n&quot;</span>
<a name="l00082"></a>00082            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00083"></a>00083            <span class="stringliteral">&quot;Replaces existing column with list\n&quot;</span> )
<a name="l00084"></a>00084 
<a name="l00085"></a>00085     .def ( <span class="stringliteral">&quot;replaceColumn&quot;</span>,
<a name="l00086"></a>00086            ( <span class="keywordtype">void</span> ( ListTuple:: * ) <span class="comment">//function pointer</span>
<a name="l00087"></a>00087              ( <span class="keyword">const</span> std::string &amp;, <a class="code" href="classboost_1_1python_1_1list.html" title="A wrapper class for Python list objects.">boost::python::list</a> ) ) <span class="comment">// signature</span>
<a name="l00088"></a>00088            &amp;ListTuple::replaceColumn,
<a name="l00089"></a>00089            with_custodian_and_ward &lt; 1, 2 &gt; (),
<a name="l00090"></a>00090            <span class="stringliteral">&quot;replaceColumn ( string, list ) -&gt; None\n&quot;</span>
<a name="l00091"></a>00091            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00092"></a>00092            <span class="stringliteral">&quot;Replaces existing column with new array\n&quot;</span> )
<a name="l00093"></a>00093 
<a name="l00094"></a>00094     .def ( <span class="stringliteral">&quot;notifyObservers&quot;</span>,
<a name="l00095"></a>00095            &amp;<a class="code" href="classhippodraw_1_1ListTuple.html#a22405609eb7094686259b6a82ad8e0cc" title="Notifies observers.">ListTuple::notifyObservers</a>,
<a name="l00096"></a>00096            <span class="stringliteral">&quot;notifyObservers ( None ) -&gt; None\n&quot;</span>
<a name="l00097"></a>00097            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00098"></a>00098            <span class="stringliteral">&quot;Sends update message to all observers.  Use this member if the\n&quot;</span>
<a name="l00099"></a>00099            <span class="stringliteral">&quot;contents of the reference Python list has changed and Display\n&quot;</span>
<a name="l00100"></a>00100            <span class="stringliteral">&quot;objects bound to it require updating.&quot;</span> )
<a name="l00101"></a>00101 
<a name="l00102"></a>00102     ;
<a name="l00103"></a>00103 }
<a name="l00104"></a>00104 
<a name="l00105"></a>00105 } <span class="comment">// namespace Python</span>
<a name="l00106"></a>00106 } <span class="comment">// namespace hippodraw</span>
</pre></div></div>
<hr size="1"><address style="align: right;"><small>
Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
</a> </small></address>
</body>
</html>