Sophie

Sophie

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

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_81660c05fb6bfb5c6c7ef0fee605ba15.html">datasrcs</a>
  </div>
</div>
<div class="contents">
<h1>DataSourceController.h</h1><a href="DataSourceController_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: c++ -*- */</span>
<a name="l00002"></a>00002 
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef _DataSourceController_H_</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define _DataSourceController_H_</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="Observer_8h.html" title="Observer class interface.">pattern/Observer.h</a>&quot;</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#include &lt;msdevstudio/MSconfig.h&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#pragma warning(disable:4290) // advice from MSDN article and others</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>                              <span class="comment">// VC++ is not following the standard</span>
<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;stdexcept&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>hippodraw {
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">class </span>DataSource;
<a name="l00031"></a>00031 <span class="keyword">class </span>Observable;
<a name="l00032"></a>00032 
<a name="l00040"></a><a class="code" href="classhippodraw_1_1DataSourceController.html">00040</a> <span class="keyword">class </span><a class="code" href="libhippo_8h.html#a480024fd54849c743866874550153711">MDL_HIPPOPLOT_API</a> <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> : <span class="keyword">private</span> hippodraw::<a class="code" href="classhippodraw_1_1Observer.html" title="Part of an implementation of the Observable Observer pattern based on the example...">Observer</a>
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">private</span>:
<a name="l00044"></a>00044 
<a name="l00046"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#aa9a6feee6cf8d3a035cb470a3f4d8209">00046</a>   <span class="keyword">static</span> <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> * s_instance;
<a name="l00047"></a>00047 
<a name="l00049"></a>00049   <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a>();
<a name="l00050"></a>00050 
<a name="l00052"></a>00052   <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> &amp; );
<a name="l00053"></a>00053 
<a name="l00057"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#a222405fc15bfed1689eb6fb743401fa2">00057</a>   <span class="keyword">typedef</span> std::vector &lt; DataSource * &gt; <a class="code" href="classhippodraw_1_1DataSourceController.html#a222405fc15bfed1689eb6fb743401fa2" title="The type of STL container used to keep list of DataSource objects.">DataSourceList_t</a>;
<a name="l00058"></a>00058 
<a name="l00061"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#a65b285ea41cdd0331722043a317392a1">00061</a>   <a class="code" href="classhippodraw_1_1DataSourceController.html#a222405fc15bfed1689eb6fb743401fa2" title="The type of STL container used to keep list of DataSource objects.">DataSourceList_t</a> m_sources;
<a name="l00062"></a>00062 
<a name="l00065"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#ab41b35245d39d7599a8d53c1bb058fbe">00065</a>   <a class="code" href="classhippodraw_1_1DataSourceController.html#a222405fc15bfed1689eb6fb743401fa2" title="The type of STL container used to keep list of DataSource objects.">DataSourceList_t</a> m_ds_files;
<a name="l00066"></a>00066 
<a name="l00068"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#a880f6ef1097d038e0d317d4fcc5ed70b">00068</a>   <span class="keyword">mutable</span> std:: vector &lt; std::string &gt; m_names;
<a name="l00069"></a>00069 
<a name="l00071"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#aabcb87da7c9e2358c0c8f8cbfe6b3560">00071</a>   std::string m_base_name;
<a name="l00072"></a>00072 
<a name="l00075"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#ad04daf59718b15733b41c2dee6f96c05">00075</a>   <span class="keywordtype">int</span> m_suffix;
<a name="l00076"></a>00076 
<a name="l00079"></a><a class="code" href="classhippodraw_1_1DataSourceController.html#acd75354e4ee930946e5825b1a07758c7">00079</a>   <span class="keywordtype">int</span> m_current_index;
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 <span class="keyword">public</span>:
<a name="l00082"></a>00082 
<a name="l00084"></a>00084   <span class="keyword">static</span> <a class="code" href="classhippodraw_1_1DataSourceController.html" title="A singleton class that is the interface between GUI and the DataSource objects.">DataSourceController</a> * instance ();
<a name="l00085"></a>00085 
<a name="l00090"></a>00090   <span class="keyword">virtual</span> <span class="keywordtype">void</span> update ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Observable.html" title="Part of an implementation of the Observable-Observer pattern based on the example...">Observable</a> * );
<a name="l00091"></a>00091 
<a name="l00095"></a>00095   <span class="keywordtype">void</span> willDelete ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Observable.html" title="Part of an implementation of the Observable-Observer pattern based on the example...">Observable</a> * observee );
<a name="l00096"></a>00096 
<a name="l00102"></a>00102   <span class="keywordtype">int</span> indexOfDataSource ( <span class="keyword">const</span> std::string &amp; name ) <span class="keyword">const</span>;
<a name="l00103"></a>00103 
<a name="l00111"></a>00111   <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * findDataSource ( <span class="keyword">const</span> std::string &amp; name ) 
<a name="l00112"></a>00112     <span class="keyword">const</span> <span class="keywordflow">throw</span> ( std::runtime_error );
<a name="l00113"></a>00113 
<a name="l00121"></a>00121   <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * getDataSource ( <span class="keyword">const</span> std::string &amp; name ) <span class="keyword">const</span>;
<a name="l00122"></a>00122 
<a name="l00127"></a>00127   <span class="keywordtype">void</span> changeName ( <span class="keyword">const</span> std::string &amp; old_name, 
<a name="l00128"></a>00128                     <span class="keyword">const</span> std::string &amp; new_name );
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 
<a name="l00137"></a>00137   <span class="keywordtype">void</span> getDataSources ( std::vector &lt; DataSource * &gt; &amp;,
<a name="l00138"></a>00138                         <span class="keywordtype">bool</span> all = <span class="keyword">true</span> ) <span class="keyword">const</span>;
<a name="l00139"></a>00139 
<a name="l00145"></a>00145   <span class="keyword">const</span> std::vector &lt; std::string &gt; &amp; getNTupleNames () <span class="keyword">const</span>;
<a name="l00146"></a>00146 
<a name="l00149"></a>00149   <span class="keywordtype">void</span> registerDataSourceFile ( <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * ds );
<a name="l00150"></a>00150 
<a name="l00155"></a>00155   std::string registerNTuple ( <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * nt );
<a name="l00156"></a>00156 
<a name="l00162"></a>00162   <span class="keywordtype">void</span> registerNTuple ( <span class="keyword">const</span> std::string &amp;, <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source );
<a name="l00163"></a>00163 
<a name="l00168"></a>00168   <span class="keywordtype">void</span> unregisterNTuple ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * nt );
<a name="l00169"></a>00169 
<a name="l00173"></a>00173   <span class="keywordtype">bool</span> isFromFile ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * source ) <span class="keyword">const</span>;
<a name="l00174"></a>00174 
<a name="l00177"></a>00177   <a class="code" href="classhippodraw_1_1DataSource.html" title="Base class for DataSource.">DataSource</a> * getCurrent () <span class="keyword">const</span>;
<a name="l00178"></a>00178 
<a name="l00181"></a>00181   <span class="keywordtype">void</span> setCurrentIndex ( <span class="keywordtype">int</span> index );
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 };
<a name="l00184"></a>00184 
<a name="l00185"></a>00185 } <span class="comment">// namespace hippodraw</span>
<a name="l00186"></a>00186 
<a name="l00187"></a>00187 <span class="preprocessor">#endif // _DataSourceController_H_</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>