classaflibenvfile.html
来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 221 行
HTML
221 行
<!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>aflibEnvFile class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.15 --><center><a class="qindex" href="index.html">Main Page</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>aflibEnvFile Class Reference</h1>Manages settings for each individual of a program. <a href="#_details">More...</a><p><code>#include <<a class="el" href="aflibEnvFile_8h-source.html">aflibEnvFile.h</a>></code><p><a href="classaflibEnvFile-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classaflibEnvFile.html#a0">aflibEnvFile</a> (char *env_file, char *env_dir=NULL)</td></tr><tr><td> </td><td><font size=-1><em>Constructor with parameters.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classaflibEnvFile.html#a1">aflibEnvFile</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classaflibEnvFile.html#a2">~aflibEnvFile</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Destructor.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classaflibEnvFile.html#a3">readValueFromFile</a> (string &key_str, string &results)</td></tr><tr><td> </td><td><font size=-1><em>Read a value from a file.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classaflibEnvFile.html#a4">writeValueToFile</a> (string &key_str, string &value)</td></tr><tr><td> </td><td><font size=-1><em>Write a value to a file.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Manages settings for each individual of a program.<p>This class will create a .<name> directory in the users home directory or a directory for the users choice. It will then manage a set of key values that the programmer can search for. This allows programmers to save a users settings and then retrieve then at a latter time. It currently supports upto 1024 different settings. Two constructors are provided. They will dertermine what directory to look for the settings file and what the name of the file is. If the directory is not specified then a default directory of .<DEFAULT_DIR> will be created in the users home directory. A file will be created in this directory. The name will be the one specified by the caller. If none is specified then DEFAULT_FILE will be created. To retrieve and store strings into the file readValueFromFile and writeValueToFile should be called. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="aflibEnvFile::aflibEnvFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> aflibEnvFile::aflibEnvFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>env_file</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>env_dir</em> = NULL</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Constructor with parameters.<p>This will create a environment directory name to use with env_dir. If this is NULL then a default directory in the users home directory will be used. If env_file is set then this file name will be used in the env_dir. Otherwise a default file name will be used in the env_dir. </td> </tr></table><a name="a1" doxytag="aflibEnvFile::aflibEnvFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> aflibEnvFile::aflibEnvFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Constructor with no parameters.<p>This constructor will use defaults for the directory and env files. </td> </tr></table><a name="a2" doxytag="aflibEnvFile::~aflibEnvFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> aflibEnvFile::~aflibEnvFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Destructor.<p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a3" doxytag="aflibEnvFile::readValueFromFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool aflibEnvFile::readValueFromFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">string & </td> <td class="mdname" nowrap> <em>key_str</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>string & </td> <td class="mdname" nowrap> <em>results</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Read a value from a file.<p>This function will read a string from the env file that corresponds to the key key_str passed in. </td> </tr></table><a name="a4" doxytag="aflibEnvFile::writeValueToFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void aflibEnvFile::writeValueToFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">string & </td> <td class="mdname" nowrap> <em>key_str</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>string & </td> <td class="mdname" nowrap> <em>value</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Write a value to a file.<p>This function will write a value for the key key_str. If the key_str already exists then it will be overwritten. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="aflibEnvFile_8h-source.html">aflibEnvFile.h</a><li><a class="el" href="aflibEnvFile_8cc.html">aflibEnvFile.cc</a></ul><hr><address align="right"><small>Generated on Wed May 8 20:51:11 2002 for Open Source Audio Library Project 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.15 </small></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?