⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pprocess_8h-source.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
00422 00431     <span class="keyword">static</span> <a class="code" href="classPProcess.html">PProcess</a> &amp; <a class="code" href="classPProcess.html#z227_16">Current</a>();00432 00439     <span class="keyword">static</span> BOOL <a class="code" href="classPProcess.html#z227_17">IsInitialised</a>();00440 00447     <span class="keywordtype">void</span> <a class="code" href="classPProcess.html#z227_0">SetTerminationValue</a>(00448       <span class="keywordtype">int</span> value  00449     );00450 00460     <span class="keywordtype">int</span> <a class="code" href="classPProcess.html#z227_1">GetTerminationValue</a>() <span class="keyword">const</span>;00461 00468     <a class="code" href="classPArgList.html">PArgList</a> &amp; <a class="code" href="classPProcess.html#z227_2">GetArguments</a>();00469 00479     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; <a class="code" href="classPProcess.html#z227_3">GetManufacturer</a>() <span class="keyword">const</span>;00480 00490     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; <a class="code" href="classPProcess.html#z227_4">GetName</a>() <span class="keyword">const</span>;00491 00506     <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z227_5">GetVersion</a>(00507       BOOL full = TRUE 00508     ) <span class="keyword">const</span>;00509 00515     <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> &amp; <a class="code" href="classPProcess.html#z227_6">GetFile</a>() <span class="keyword">const</span>;00516 00524     DWORD <a class="code" href="classPProcess.html#z227_7">GetProcessID</a>() <span class="keyword">const</span>;00525 00534     <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z227_8">GetUserName</a>() <span class="keyword">const</span>;00535 00558     BOOL <a class="code" href="classPProcess.html#z227_9">SetUserName</a>(00559       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; username, 00560       BOOL permanent = FALSE    00561     );00562 00571     <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z227_10">GetGroupName</a>() <span class="keyword">const</span>;00572 00597     BOOL <a class="code" href="classPProcess.html#z227_11">SetGroupName</a>(00598       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; groupname, 00599       BOOL permanent = FALSE     00600     );00601 00608     <span class="keywordtype">int</span> <a class="code" href="classPProcess.html#z227_12">GetMaxHandles</a>() <span class="keyword">const</span>;00609 00619     BOOL <a class="code" href="classPProcess.html#z227_13">SetMaxHandles</a>(00620       <span class="keywordtype">int</span> newLimit  00621     );00622 00625     <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z227_14">GetConfigurationFile</a>();00626 00640     <span class="keywordtype">void</span> <a class="code" href="classPProcess.html#z227_15">SetConfigurationPath</a>(00641       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; path   00642     );00644 00653     <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z229_0">GetOSClass</a>();00654 00661     <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z229_1">GetOSName</a>();00662 00668     <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z229_2">GetOSHardware</a>();00669 00676     <span class="keyword">static</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPProcess.html#z229_3">GetOSVersion</a>();00677 00685     <span class="keyword">static</span> <a class="code" href="classPDirectory.html">PDirectory</a> <a class="code" href="classPProcess.html#z229_4">GetOSConfigDir</a>();00687 00688     <a class="code" href="classPTimerList.html">PTimerList</a> * <a class="code" href="classPProcess.html#a0">GetTimerList</a>();00689     <span class="comment">/* Get the list of timers handled by the application. This is an internal</span>00690 <span class="comment">       function and should not need to be called by the user.</span>00691 <span class="comment">       </span>00692 <span class="comment">       @return</span>00693 <span class="comment">       list of timers.</span>00694 <span class="comment">     */</span>00695 00696     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPProcess.html#d0">PreInitialise</a>(00697       <span class="keywordtype">int</span> argc,     <span class="comment">// Number of program arguments.</span>00698       <span class="keywordtype">char</span> ** argv, <span class="comment">// Array of strings for program arguments.</span>00699       <span class="keywordtype">char</span> ** envp  <span class="comment">// Array of string for the system environment</span>00700     );00701     <span class="comment">/* Internal initialisation function called directly from</span>00702 <span class="comment">       #_main()#. The user should never call this function.</span>00703 <span class="comment">     */</span>00704 00705     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classPProcess.html#d1">PreShutdown</a>();00706     <span class="comment">/* Internal shutdown function called directly from the ~PProcess</span>00707 <span class="comment">       #_main()#. The user should never call this function.</span>00708 <span class="comment">     */</span>00709 00710     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPProcess.html#a1">_main</a>(<span class="keywordtype">void</span> * arg = NULL);00711     <span class="comment">// Main function for process, called from real main after initialisation</span>00712 00713     <a class="code" href="classPTime.html">PTime</a> <a class="code" href="classPProcess.html#a2">GetStartTime</a>() <span class="keyword">const</span>;00714     <span class="comment">/* return the time at which the program was started </span>00715 <span class="comment">    */</span>00716 00717   <span class="keyword">private</span>:00718     <span class="keywordtype">void</span> Construct();00719 00720   <span class="comment">// Member variables</span>00721     <span class="keyword">static</span> <span class="keywordtype">int</span> p_argc;00722     <span class="keyword">static</span> <span class="keywordtype">char</span> ** p_argv;00723     <span class="keyword">static</span> <span class="keywordtype">char</span> ** p_envp;00724     <span class="comment">// main arguments</span>00725 00726     <span class="keywordtype">int</span> terminationValue;00727     <span class="comment">// Application return value</span>00728 00729     <a class="code" href="classPString.html">PString</a> manufacturer;00730     <span class="comment">// Application manufacturer name.</span>00731 00732     <a class="code" href="classPString.html">PString</a> productName;00733     <span class="comment">// Application executable base name from argv[0]</span>00734 00735     WORD majorVersion;00736     <span class="comment">// Major version number of the product</span>00737     00738     WORD minorVersion;00739     <span class="comment">// Minor version number of the product</span>00740     00741     <a class="code" href="classPProcess.html#z221_0">CodeStatus</a> status;00742     <span class="comment">// Development status of the product</span>00743     00744     WORD buildNumber;00745     <span class="comment">// Build number of the product</span>00746 00747     <a class="code" href="classPFilePath.html">PFilePath</a> executableFile;00748     <span class="comment">// Application executable file from argv[0] (not open)</span>00749 00750     <a class="code" href="classPStringList.html">PStringList</a> configurationPaths;00751     <span class="comment">// Explicit file or set of directories to find default PConfig</span>00752 00753     <a class="code" href="classPArgList.html">PArgList</a> arguments;00754     <span class="comment">// The list of arguments</span>00755 00756     <a class="code" href="classPTimerList.html">PTimerList</a> timers;00757     <span class="comment">// List of active timers in system</span>00758 00759     <a class="code" href="classPTime.html">PTime</a> programStartTime;00760     <span class="comment">// time at which process was intantiated, i.e. started</span>00761 00762     <span class="keywordtype">int</span> maxHandles;00763     <span class="comment">// Maximum number of file handles process can open.</span>00764 00765 <a name="l00766"></a><a class="code" href="classPProcess.html#l0">00766</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPThread.html">PThread</a>;00767 00768 00769 <span class="comment">// Include platform dependent part of class</span>00770 <span class="preprocessor">#ifdef _WIN32</span>00771 <span class="preprocessor"></span><span class="preprocessor">#include "msos/ptlib/pprocess.h"</span>00772 <span class="preprocessor">#else</span>00773 <span class="preprocessor"></span><span class="preprocessor">#include "unix/ptlib/pprocess.h"</span>00774 <span class="preprocessor">#endif</span>00775 <span class="preprocessor"></span>};00776 00777 <span class="comment">/*</span>00778 <span class="comment"> *  one instance of this class (or any descendants) will be instantiated</span>00779 <span class="comment"> *  via PGenericFactory&lt;PProessStartup&gt; one "main" has been started, and then</span>00780 <span class="comment"> *  the OnStartup() function will be called. The OnShutdown function will</span>00781 <span class="comment"> *  be called after main exits, and the instances will be destroyed if they</span>00782 <span class="comment"> *  are not singletons</span>00783 <span class="comment"> */</span>00784 <span class="keyword">class </span><a class="code" href="classPProcessStartup.html">PProcessStartup</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00785 {00786   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPProcessStartup.html">PProcessStartup</a>, <a class="code" href="classPObject.html">PObject</a>)00787   <span class="keyword">public</span>:00788     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPProcessStartup.html#a0">OnStartup</a>()  { }00789     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPProcessStartup.html#a1">OnShutdown</a>() { }00790 };00791 00792 <span class="keyword">typedef</span> <a class="code" href="classPFactory.html">PFactory&lt;PProcessStartup&gt;</a> <a class="code" href="classPFactory.html">PProcessStartupFactory</a>;00793 00794 <span class="comment">// using an inline definition rather than a #define crashes gcc 2.95. Go figure</span>00795 <span class="preprocessor">#define P_DEFAULT_TRACE_OPTIONS ( PTrace::Blocks | PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine )</span>00796 <span class="preprocessor"></span>00797 <span class="keyword">template</span> &lt;<span class="keywordtype">unsigned</span> _level, <span class="keywordtype">unsigned</span> _options = P_DEFAULT_TRACE_OPTIONS &gt;00798 <span class="keyword">class </span><a class="code" href="classPTraceLevelSetStartup.html">PTraceLevelSetStartup</a> : <span class="keyword">public</span> <a class="code" href="classPProcessStartup.html">PProcessStartup</a>00799 {00800   <span class="keyword">public</span>:00801     <span class="keywordtype">void</span> <a class="code" href="classPTraceLevelSetStartup.html#a0">OnStartup</a>()00802     { <a class="code" href="classPTrace.html#d0">PTrace::Initialise</a>(_level, NULL, _options); }00803 };00804 00805 <span class="preprocessor">#endif</span>00806 <span class="preprocessor"></span>00807 <span class="comment">// End Of File ///////////////////////////////////////////////////////////////</span></pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:11 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -