diff options
Diffstat (limited to 'doc/api-documentation/html/filemgr_8h-source.html')
-rw-r--r-- | doc/api-documentation/html/filemgr_8h-source.html | 157 |
1 files changed, 79 insertions, 78 deletions
diff --git a/doc/api-documentation/html/filemgr_8h-source.html b/doc/api-documentation/html/filemgr_8h-source.html index e611129..960c803 100644 --- a/doc/api-documentation/html/filemgr_8h-source.html +++ b/doc/api-documentation/html/filemgr_8h-source.html @@ -3,94 +3,95 @@ <title>filemgr.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.2.15 --> +<!-- Generated by Doxygen 1.2.17 --> <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="classes.html">Alphabetical List</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> </center> -<hr><h1>filemgr.h</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font> -00002 <font class="comment"> * filemgr.h - definition of class FileMgr used for pooling file handles</font> -00003 <font class="comment"> *</font> -00004 <font class="comment"> * $Id: filemgr_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $</font> -00005 <font class="comment"> *</font> -00006 <font class="comment"> * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)</font> -00007 <font class="comment"> * CrossWire Bible Society</font> -00008 <font class="comment"> * P. O. Box 2528</font> -00009 <font class="comment"> * Tempe, AZ 85280-2528</font> -00010 <font class="comment"> *</font> -00011 <font class="comment"> * This program is free software; you can redistribute it and/or modify it</font> -00012 <font class="comment"> * under the terms of the GNU General Public License as published by the</font> -00013 <font class="comment"> * Free Software Foundation version 2.</font> -00014 <font class="comment"> *</font> -00015 <font class="comment"> * This program is distributed in the hope that it will be useful, but</font> -00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> -00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> -00018 <font class="comment"> * General Public License for more details.</font> -00019 <font class="comment"> *</font> -00020 <font class="comment"> */</font> +<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="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> </center> +<hr><h1>filemgr.h</h1><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span> +00002 <span class="comment"> * filemgr.h - definition of class FileMgr used for pooling file handles</span> +00003 <span class="comment"> *</span> +00004 <span class="comment"> * $Id: filemgr_8h-source.html,v 1.9 2002/10/31 11:30:15 joachim Exp $</span> +00005 <span class="comment"> *</span> +00006 <span class="comment"> * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)</span> +00007 <span class="comment"> * CrossWire Bible Society</span> +00008 <span class="comment"> * P. O. Box 2528</span> +00009 <span class="comment"> * Tempe, AZ 85280-2528</span> +00010 <span class="comment"> *</span> +00011 <span class="comment"> * This program is free software; you can redistribute it and/or modify it</span> +00012 <span class="comment"> * under the terms of the GNU General Public License as published by the</span> +00013 <span class="comment"> * Free Software Foundation version 2.</span> +00014 <span class="comment"> *</span> +00015 <span class="comment"> * This program is distributed in the hope that it will be useful, but</span> +00016 <span class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</span> +00017 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> +00018 <span class="comment"> * General Public License for more details.</span> +00019 <span class="comment"> *</span> +00020 <span class="comment"> */</span> 00021 -00022 <font class="preprocessor">#ifndef FILEMGR_H</font> -00023 <font class="preprocessor"></font><font class="preprocessor">#define FILEMGR_H</font> -00024 <font class="preprocessor"></font> -00025 <font class="preprocessor">#include <sys/stat.h></font> -00026 <font class="preprocessor">#include <fcntl.h></font> +00022 <span class="preprocessor">#ifndef FILEMGR_H</span> +00023 <span class="preprocessor"></span><span class="preprocessor">#define FILEMGR_H</span> +00024 <span class="preprocessor"></span> +00025 <span class="preprocessor">#include <sys/stat.h></span> +00026 <span class="preprocessor">#include <fcntl.h></span> 00027 -00028 <font class="preprocessor">#include <defs.h></font> +00028 <span class="preprocessor">#include <defs.h></span> 00029 -00030 <font class="keyword">class </font>SWDLLEXPORT FileMgr; +00030 SWORD_NAMESPACE_START 00031 -00032 <font class="keyword">class </font>SWDLLEXPORT FileDesc -00033 { -00034 -00035 <font class="keyword">friend</font> <font class="keyword">class </font>FileMgr; +00032 <span class="keyword">class </span>SWDLLEXPORT FileMgr; +00033 +00034 <span class="keyword">class </span>SWDLLEXPORT FileDesc +00035 { 00036 -00037 <font class="keywordtype">long</font> offset; -00038 <font class="keywordtype">int</font> fd; <font class="comment">// -77 closed;</font> -00039 FileMgr *parent; -00040 FileDesc *next; -00041 -00042 <font class="keyword">public</font>: -00043 FileDesc (FileMgr * parent, <font class="keywordtype">char</font> *path, <font class="keywordtype">int</font> mode, <font class="keywordtype">int</font> perms, <font class="keywordtype">bool</font> tryDowngrade); -00044 <font class="keyword">virtual</font> ~FileDesc (); -00045 <font class="keywordtype">int</font> getFd (); -00046 <font class="keywordtype">char</font> *path; -00047 <font class="keywordtype">int</font> mode; -00048 <font class="keywordtype">int</font> perms; -00049 <font class="keywordtype">bool</font> tryDowngrade; -00050 }; -00051 -00052 -00053 <font class="keyword">class </font>FileMgr -00054 { -00055 -00056 <font class="keyword">friend</font> <font class="keyword">class </font>FileDesc; +00037 <span class="keyword">friend</span> <span class="keyword">class </span>FileMgr; +00038 +00039 <span class="keywordtype">long</span> offset; +00040 <span class="keywordtype">int</span> fd; <span class="comment">// -77 closed;</span> +00041 FileMgr *parent; +00042 FileDesc *next; +00043 +00044 <span class="keyword">public</span>: +00045 FileDesc (FileMgr * parent, <span class="keywordtype">char</span> *path, <span class="keywordtype">int</span> mode, <span class="keywordtype">int</span> perms, <span class="keywordtype">bool</span> tryDowngrade); +00046 <span class="keyword">virtual</span> ~FileDesc (); +00047 <span class="keywordtype">int</span> getFd (); +00048 <span class="keywordtype">char</span> *path; +00049 <span class="keywordtype">int</span> mode; +00050 <span class="keywordtype">int</span> perms; +00051 <span class="keywordtype">bool</span> tryDowngrade; +00052 }; +00053 +00054 +00055 <span class="keyword">class </span>FileMgr +00056 { 00057 -00058 FileDesc *files; -00059 <font class="keywordtype">int</font> sysOpen (FileDesc * file); -00060 <font class="keyword">public</font>: -00061 -00062 FileMgr (<font class="keywordtype">int</font> maxFiles = 35); -00063 ~FileMgr (); -00064 FileDesc *open (<font class="keywordtype">char</font> *path, <font class="keywordtype">int</font> mode, <font class="keywordtype">bool</font> tryDowngrade); -00065 FileDesc *open (<font class="keywordtype">char</font> *path, <font class="keywordtype">int</font> mode, <font class="keywordtype">int</font> perms = S_IREAD | S_IWRITE, <font class="keywordtype">bool</font> tryDowngrade = <font class="keyword">false</font>); -00066 <font class="keywordtype">void</font> close (FileDesc *); -00067 -00068 <font class="keyword">static</font> <font class="keywordtype">signed</font> <font class="keywordtype">char</font> existsFile (<font class="keyword">const</font> <font class="keywordtype">char</font> *ipath, <font class="keyword">const</font> <font class="keywordtype">char</font> *ifileName = 0); -00069 <font class="keyword">static</font> <font class="keywordtype">signed</font> <font class="keywordtype">char</font> existsDir (<font class="keyword">const</font> <font class="keywordtype">char</font> *ipath, <font class="keyword">const</font> <font class="keywordtype">char</font> *idirName = 0); -00070 <font class="comment">// to truncate a file at its current position</font> -00071 <font class="comment">// leaving byte at current possition intact</font> -00072 <font class="comment">// deleting everything afterward.</font> -00073 <font class="keywordtype">signed</font> <font class="keywordtype">char</font> trunc (FileDesc *); -00074 -00075 <font class="keywordtype">int</font> maxFiles; -00076 <font class="keyword">static</font> FileMgr systemFileMgr; -00077 }; -00078 -00079 +00058 <span class="keyword">friend</span> <span class="keyword">class </span>FileDesc; +00059 +00060 FileDesc *files; +00061 <span class="keywordtype">int</span> sysOpen (FileDesc * file); +00062 <span class="keyword">public</span>: +00063 +00064 FileMgr (<span class="keywordtype">int</span> maxFiles = 35); +00065 ~FileMgr (); +00066 FileDesc *open (<span class="keywordtype">char</span> *path, <span class="keywordtype">int</span> mode, <span class="keywordtype">bool</span> tryDowngrade); +00067 FileDesc *open (<span class="keywordtype">char</span> *path, <span class="keywordtype">int</span> mode, <span class="keywordtype">int</span> perms = S_IREAD | S_IWRITE, <span class="keywordtype">bool</span> tryDowngrade = <span class="keyword">false</span>); +00068 <span class="keywordtype">void</span> close (FileDesc *); +00069 +00070 <span class="keyword">static</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> existsFile (<span class="keyword">const</span> <span class="keywordtype">char</span> *ipath, <span class="keyword">const</span> <span class="keywordtype">char</span> *ifileName = 0); +00071 <span class="keyword">static</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> existsDir (<span class="keyword">const</span> <span class="keywordtype">char</span> *ipath, <span class="keyword">const</span> <span class="keywordtype">char</span> *idirName = 0); +00072 <span class="comment">// to truncate a file at its current position</span> +00073 <span class="comment">// leaving byte at current possition intact</span> +00074 <span class="comment">// deleting everything afterward.</span> +00075 <span class="keywordtype">signed</span> <span class="keywordtype">char</span> trunc (FileDesc *); +00076 +00077 <span class="keywordtype">int</span> maxFiles; +00078 <span class="keyword">static</span> FileMgr systemFileMgr; +00079 }; 00080 00081 -00082 <font class="preprocessor">#endif</font> -</pre></div><hr><address align="right"><small>Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by +00082 SWORD_NAMESPACE_END +00083 <span class="preprocessor">#endif</span> +</pre></div><hr><address style="align: right;"><small>Generated on Thu Oct 31 12:11:28 2002 for The Sword 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> +width=110 height=53></a>1.2.17 </small></address> </body> </html> |