Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 06e1e0ab98898582c876a8be34ecb5e9 > files > 282

capisuite-0.4.5-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CapiSuite: idlescript.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>idlescript.h</h1><a href="idlescript_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 
00008 <span class="comment">/***************************************************************************</span>
00009 <span class="comment"> *                                                                         *</span>
00010 <span class="comment"> *   This program is free software; you can redistribute it and/or modify  *</span>
00011 <span class="comment"> *   it under the terms of the GNU General Public License as published by  *</span>
00012 <span class="comment"> *   the Free Software Foundation; either version 2 of the License, or     *</span>
00013 <span class="comment"> *   (at your option) any later version.                                   *</span>
00014 <span class="comment"> *                                                                         *</span>
00015 <span class="comment"> ***************************************************************************/</span>
00016 
00017 <span class="preprocessor">#ifndef IDLESCRIPT_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define IDLESCRIPT_H</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include &lt;string&gt;</span>
00021 <span class="preprocessor">#include "<a class="code" href="applicationexception_8h.html">applicationexception.h</a>"</span>
00022 <span class="preprocessor">#include "<a class="code" href="pythonscript_8h.html">pythonscript.h</a>"</span>
00023 
00024 <span class="keyword">class </span><a class="code" href="classCapi.html">Capi</a>;
00025 <span class="keyword">class </span>PycStringIO_CAPI;
00026 
00032 <span class="keywordtype">void</span>* idlescript_exec_handler(<span class="keywordtype">void</span>* arg);
00033 
00039 <span class="keywordtype">void</span> idlescript_cleanup_handler(<span class="keywordtype">void</span>* arg);
00040 
<a name="l00054"></a><a class="code" href="classIdleScript.html">00054</a> <span class="keyword">class </span><a class="code" href="classIdleScript.html">IdleScript</a>: <span class="keyword">public</span> <a class="code" href="classPythonScript.html">PythonScript</a>
00055 {
00056         <span class="keyword">friend</span> <span class="keywordtype">void</span>* <a class="code" href="classIdleScript.html#n0">idlescript_exec_handler</a>(<span class="keywordtype">void</span>*);
00057         <span class="keyword">friend</span> <span class="keywordtype">void</span> <a class="code" href="classIdleScript.html#n1">idlescript_cleanup_handler</a>(<span class="keywordtype">void</span>*);
00058         <span class="keyword">public</span>:
00071                 <a class="code" href="classIdleScript.html#a0">IdleScript</a>(ostream &amp;debug, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> debug_level, ostream &amp;error, <a class="code" href="classCapi.html">Capi</a> *<a class="code" href="classIdleScript.html#r3">capi</a>, string <a class="code" href="classIdleScript.html#r1">idlescript</a>, <span class="keywordtype">int</span> <a class="code" href="classIdleScript.html#r2">idlescript_interval</a>, PyThreadState *<a class="code" href="classIdleScript.html#r0">py_state</a>, PycStringIO_CAPI* cStringIO) <span class="keywordflow">throw</span> (<a class="code" href="classApplicationError.html">ApplicationError</a>);
00072 
00075                 <span class="keyword">virtual</span> <a class="code" href="classIdleScript.html#a1">~IdleScript</a>(); 
00076                 
00079                 <span class="keywordtype">void</span> <a class="code" href="classIdleScript.html#a2">requestTerminate</a>(<span class="keywordtype">void</span>);
00080 
00083                 <span class="keywordtype">void</span> <a class="code" href="classIdleScript.html#a3">activate</a>(<span class="keywordtype">void</span>);
00084 
00085         <span class="keyword">private</span>:
00105                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classIdleScript.html#d0">run</a>(<span class="keywordtype">void</span>) <span class="keywordflow">throw</span>();
00106                 
<a name="l00107"></a><a class="code" href="classIdleScript.html#r0">00107</a>                 PyThreadState *py_state; 
<a name="l00108"></a><a class="code" href="classIdleScript.html#r1">00108</a>                 string idlescript; 
<a name="l00109"></a><a class="code" href="classIdleScript.html#r2">00109</a>                 <span class="keywordtype">int</span> idlescript_interval; 
<a name="l00110"></a><a class="code" href="classIdleScript.html#r3">00110</a>                 <a class="code" href="classCapi.html">Capi</a> *capi; 
<a name="l00111"></a><a class="code" href="classIdleScript.html#r4">00111</a>                 <span class="keywordtype">bool</span> <a class="code" href="classIdleScript.html#r4">active</a>; 
00112                 
<a name="l00113"></a><a class="code" href="classIdleScript.html#r5">00113</a>                 pthread_t <a class="code" href="classIdleScript.html#r5">thread_handle</a>; 
00114 };
00115 
00116 <span class="preprocessor">#endif</span>
00117 <span class="preprocessor"></span>
00118 <span class="comment">/* History</span>
00119 <span class="comment"></span>
00120 <span class="comment">$Log: idlescript.h,v $</span>
00121 <span class="comment">Revision 1.1  2003/02/19 08:19:53  gernot</span>
00122 <span class="comment">Initial revision</span>
00123 <span class="comment"></span>
00124 <span class="comment">Revision 1.9  2003/02/10 14:17:09  ghillie</span>
00125 <span class="comment">merged from NATIVE_PTHREADS to HEAD</span>
00126 <span class="comment"></span>
00127 <span class="comment">Revision 1.8.2.2  2003/02/10 14:04:57  ghillie</span>
00128 <span class="comment">- made destructors virtual, otherwise wrong destructor is called!</span>
00129 <span class="comment"></span>
00130 <span class="comment">Revision 1.8.2.1  2003/02/09 15:03:41  ghillie</span>
00131 <span class="comment">- rewritten to use native pthread_* calls instead of CommonC++ Thread</span>
00132 <span class="comment"></span>
00133 <span class="comment">Revision 1.8  2003/01/18 12:53:06  ghillie</span>
00134 <span class="comment">- pass on reference to Python C API to PythonScript</span>
00135 <span class="comment"></span>
00136 <span class="comment">Revision 1.7  2003/01/13 21:25:13  ghillie</span>
00137 <span class="comment">- improved comment for finish flag</span>
00138 <span class="comment"></span>
00139 <span class="comment">Revision 1.6  2003/01/06 21:02:56  ghillie</span>
00140 <span class="comment">- added support for deactivating/activating script execution w/o exiting the</span>
00141 <span class="comment">  thread (new method activate, comment changes)</span>
00142 <span class="comment"></span>
00143 <span class="comment">Revision 1.5  2003/01/06 16:22:24  ghillie</span>
00144 <span class="comment">- renamed terminate() to requestTerminate() to avoid name-conflict</span>
00145 <span class="comment">- added finish flag</span>
00146 <span class="comment"></span>
00147 <span class="comment">Revision 1.4  2003/01/04 16:00:53  ghillie</span>
00148 <span class="comment">- log improvements: log_level, timestamp</span>
00149 <span class="comment"></span>
00150 <span class="comment">Revision 1.3  2002/12/14 14:02:51  ghillie</span>
00151 <span class="comment">- added terminate() method</span>
00152 <span class="comment">- added error counting code to run() to deactivate after 10 errors</span>
00153 <span class="comment"></span>
00154 <span class="comment">Revision 1.2  2002/12/11 13:04:35  ghillie</span>
00155 <span class="comment">- minor improvements in comments, ...</span>
00156 <span class="comment"></span>
00157 <span class="comment">Revision 1.1  2002/12/10 15:54:08  ghillie</span>
00158 <span class="comment">- initial checkin, will take over functionality from FlowControl::executeIdleScript()</span>
00159 <span class="comment"></span>
00160 <span class="comment">*/</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Sun Nov 28 14:37:44 2004 for CapiSuite by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>