📄 config_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>config.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>config.h</h1><a href="config_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * config.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Application/System configuration access class.</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 1993-1998 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Portions are Copyright (C) 1993 Free Software Foundation, Inc.</span>00025 <span class="comment"> * All Rights Reserved.</span>00026 <span class="comment"> *</span>00027 <span class="comment"> * Contributor(s): ______________________________________.</span>00028 <span class="comment"> *</span>00029 <span class="comment"> * $Log: config.h,v $</span>00030 <span class="comment"> * Revision 1.26 2004/01/06 21:16:38 csoutheren</span>00031 <span class="comment"> * Added "virtual" keyword to methods to allow descendant classes.</span>00032 <span class="comment"> * Thanks to Cristian Bullokles for pointing out this issue</span>00033 <span class="comment"> *</span>00034 <span class="comment"> * Revision 1.25 2003/09/17 05:41:58 csoutheren</span>00035 <span class="comment"> * Removed recursive includes</span>00036 <span class="comment"> *</span>00037 <span class="comment"> * Revision 1.24 2003/09/17 01:18:02 csoutheren</span>00038 <span class="comment"> * Removed recursive include file system and removed all references</span>00039 <span class="comment"> * to deprecated coooperative threading support</span>00040 <span class="comment"> *</span>00041 <span class="comment"> * Revision 1.23 2002/09/16 01:08:59 robertj</span>00042 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00043 <span class="comment"> * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00044 <span class="comment"> *</span>00045 <span class="comment"> * Revision 1.22 2001/05/22 12:49:32 robertj</span>00046 <span class="comment"> * Did some seriously wierd rewrite of platform headers to eliminate the</span>00047 <span class="comment"> * stupid GNU compiler warning about braces not matching.</span>00048 <span class="comment"> *</span>00049 <span class="comment"> * Revision 1.21 2000/05/25 11:07:26 robertj</span>00050 <span class="comment"> * Added PConfig::HasKey() function to determine if value actually set.</span>00051 <span class="comment"> *</span>00052 <span class="comment"> * Revision 1.20 1999/03/09 02:59:49 robertj</span>00053 <span class="comment"> * Changed comments to doc++ compatible documentation.</span>00054 <span class="comment"> *</span>00055 <span class="comment"> * Revision 1.19 1999/02/16 08:07:11 robertj</span>00056 <span class="comment"> * MSVC 6.0 compatibility changes.</span>00057 <span class="comment"> *</span>00058 <span class="comment"> * Revision 1.18 1998/10/30 12:23:55 robertj</span>00059 <span class="comment"> * Added ability to get all key values as a dictionary.</span>00060 <span class="comment"> *</span>00061 <span class="comment"> * Revision 1.17 1998/09/23 06:20:21 robertj</span>00062 <span class="comment"> * Added open source copyright license.</span>00063 <span class="comment"> *</span>00064 <span class="comment"> * Revision 1.16 1998/01/26 00:29:26 robertj</span>00065 <span class="comment"> * Added functions to get/set 64bit integers from a PConfig.</span>00066 <span class="comment"> *</span>00067 <span class="comment"> * Revision 1.15 1997/08/07 11:58:01 robertj</span>00068 <span class="comment"> * Added ability to get registry data from other applications and anywhere in system registry.</span>00069 <span class="comment"> *</span>00070 <span class="comment"> * Revision 1.14 1996/02/25 02:50:33 robertj</span>00071 <span class="comment"> * Added consts to all GetXxxx functions.</span>00072 <span class="comment"> *</span>00073 <span class="comment"> * Revision 1.13 1996/01/28 14:10:10 robertj</span>00074 <span class="comment"> * Added time functions to PConfig.</span>00075 <span class="comment"> *</span>00076 <span class="comment"> * Revision 1.12 1995/12/10 11:54:30 robertj</span>00077 <span class="comment"> * Added WIN32 registry support for PConfig objects.</span>00078 <span class="comment"> *</span>00079 <span class="comment"> * Revision 1.11 1995/03/14 12:41:12 robertj</span>00080 <span class="comment"> * Updated documentation to use HTML codes.</span>00081 <span class="comment"> *</span>00082 <span class="comment"> * Revision 1.10 1995/01/27 11:06:20 robertj</span>00083 <span class="comment"> * Changed single string default constructor to be section name not file name.</span>00084 <span class="comment"> *</span>00085 <span class="comment"> * Revision 1.9 1994/12/12 10:11:59 robertj</span>00086 <span class="comment"> * Documentation.</span>00087 <span class="comment"> *</span>00088 <span class="comment"> * Revision 1.8 1994/08/23 11:32:52 robertj</span>00089 <span class="comment"> * Oops</span>00090 <span class="comment"> *</span>00091 <span class="comment"> * Revision 1.7 1994/08/22 00:46:48 robertj</span>00092 <span class="comment"> * Added pragma fro GNU C++ compiler.</span>00093 <span class="comment"> *</span>00094 <span class="comment"> * Revision 1.6 1994/08/21 23:43:02 robertj</span>00095 <span class="comment"> * Removed default argument when of PString type (MSC crashes).</span>00096 <span class="comment"> *</span>00097 <span class="comment"> * Revision 1.5 1994/07/27 05:58:07 robertj</span>00098 <span class="comment"> * Synchronisation.</span>00099 <span class="comment"> *</span>00100 <span class="comment"> * Revision 1.4 1994/06/25 11:55:15 robertj</span>00101 <span class="comment"> * Unix version synchronisation.</span>00102 <span class="comment"> *</span>00103 <span class="comment"> * Revision 1.3 1994/01/03 04:42:23 robertj</span>00104 <span class="comment"> * Mass changes to common container classes and interactors etc etc etc.</span>00105 <span class="comment"> *</span>00106 <span class="comment"> * Revision 1.2 1993/07/14 12:49:16 robertj</span>00107 <span class="comment"> * Fixed RCS keywords.</span>00108 <span class="comment"> *</span>00109 <span class="comment"> */</span>00110 00111 00112 <span class="preprocessor">#ifndef _PCONFIG</span>00113 <span class="preprocessor"></span><span class="preprocessor">#define _PCONFIG</span>00114 <span class="preprocessor"></span>00115 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00116 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00117 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00118 <span class="preprocessor"></span>00119 <span class="keyword">class </span>PXConfig;00120 <a name="l00141"></a><a class="code" href="classPConfig.html">00141</a> <span class="keyword">class </span><a class="code" href="classPConfig.html">PConfig</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00142 {00143 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPConfig.html">PConfig</a>, <a class="code" href="classPObject.html">PObject</a>);00144 00145 <span class="keyword">public</span>:<a name="l00150"></a><a class="code" href="classPConfig.html#z61_0">00150</a> <span class="keyword">enum</span> <a class="code" href="classPConfig.html#z61_0">Source</a> {00155 <a class="code" href="classPConfig.html#z61_0s0">Environment</a>,00161 <a class="code" href="classPConfig.html#z61_0s1">System</a>,00170 <a class="code" href="classPConfig.html#z61_0s2">Application</a>,00171 <a class="code" href="classPConfig.html#z61_0s3">NumSources</a>00172 };00173 00179 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00180 <a class="code" href="classPConfig.html#z61_0">Source</a> src = <a class="code" href="classPConfig.html#z61_0s2">Application</a> 00181 );00183 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00184 <a class="code" href="classPConfig.html#z61_0">Source</a> src, 00185 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & appname 00186 );00188 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00189 <a class="code" href="classPConfig.html#z61_0">Source</a> src, 00190 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & appname, 00191 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & manuf 00192 );00194 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00195 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section, 00196 <a class="code" href="classPConfig.html#z61_0">Source</a> src = <a class="code" href="classPConfig.html#z61_0s2">Application</a> 00197 );00199 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00200 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section, 00201 <a class="code" href="classPConfig.html#z61_0">Source</a> src, 00202 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & appname 00203 );00205 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00206 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section, 00207 <a class="code" href="classPConfig.html#z61_0">Source</a> src, 00208 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & appname, 00209 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & manuf 00210 );00212 <a class="code" href="classPConfig.html#z61_1">PConfig</a>(00213 <span class="keyword">const</span> <a class="code" href="classPFilePath.html">PFilePath</a> & filename, 00214 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section 00215 );00217 00227 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPConfig.html#z63_0">SetDefaultSection</a>(00228 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section 00229 );00230 00240 <span class="keyword">virtual</span> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPConfig.html#z63_1">GetDefaultSection</a>() <span class="keyword">const</span>;00241 00250 <span class="keyword">virtual</span> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPConfig.html#z63_2">GetSections</a>() <span class="keyword">const</span>;00251 00257 <span class="keyword">virtual</span> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPConfig.html#z63_3">GetKeys</a>() <span class="keyword">const</span>;00259 <span class="keyword">virtual</span> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPConfig.html#z63_3">GetKeys</a>(00260 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section 00261 ) <span class="keyword">const</span>;00262 00268 <span class="keyword">virtual</span> <a class="code" href="classPStringToString.html">PStringToString</a> <a class="code" href="classPConfig.html#z63_5">GetAllKeyValues</a>() <span class="keyword">const</span>;00270 <span class="keyword">virtual</span> <a class="code" href="classPStringToString.html">PStringToString</a> <a class="code" href="classPConfig.html#z63_5">GetAllKeyValues</a>(00271 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section 00272 ) <span class="keyword">const</span>;00273 00274 00281 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPConfig.html#z63_7">DeleteSection</a>();00283 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPConfig.html#z63_7">DeleteSection</a>(00284 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & section 00285 );00286
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -