📄 _file_module_8hpp-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>libpion: /Users/mdickey/code/libpion-export/modules/FileModule.hpp Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul></div><h1>/Users/mdickey/code/libpion-export/modules/FileModule.hpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -----------------------------------------------------------------</span><a name="l00002"></a>00002 <span class="comment">// libpion: a C++ framework for building lightweight HTTP interfaces</span><a name="l00003"></a>00003 <span class="comment">// -----------------------------------------------------------------</span><a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2007 Atomic Labs, Inc. (http://www.atomiclabs.com)</span><a name="l00005"></a>00005 <span class="comment">//</span><a name="l00006"></a>00006 <span class="comment">// Distributed under the Boost Software License, Version 1.0.</span><a name="l00007"></a>00007 <span class="comment">// See accompanying file COPYING or copy at http://www.boost.org/LICENSE_1_0.txt</span><a name="l00008"></a>00008 <span class="comment">//</span><a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="preprocessor">#ifndef __PION_FILEMODULE_HEADER__</span><a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define __PION_FILEMODULE_HEADER__</span><a name="l00012"></a>00012 <span class="preprocessor"></span><a name="l00013"></a>00013 <span class="preprocessor">#include <libpion/PionLogger.hpp></span><a name="l00014"></a>00014 <span class="preprocessor">#include <libpion/PionException.hpp></span><a name="l00015"></a>00015 <span class="preprocessor">#include <libpion/PionHashMap.hpp></span><a name="l00016"></a>00016 <span class="preprocessor">#include <libpion/HTTPModule.hpp></span><a name="l00017"></a>00017 <span class="preprocessor">#include <boost/functional/hash.hpp></span><a name="l00018"></a>00018 <span class="preprocessor">#include <boost/filesystem/path.hpp></span><a name="l00019"></a>00019 <span class="preprocessor">#include <boost/thread/once.hpp></span><a name="l00020"></a>00020 <span class="preprocessor">#include <boost/thread/mutex.hpp></span><a name="l00021"></a>00021 <span class="preprocessor">#include <boost/shared_array.hpp></span><a name="l00022"></a>00022 <span class="preprocessor">#include <string></span><a name="l00023"></a>00023 <span class="preprocessor">#include <map></span><a name="l00024"></a>00024 <a name="l00025"></a>00025 <a name="l00029"></a><a class="code" href="class_file_module.html">00029</a> <span class="keyword">class </span><a class="code" href="class_file_module.html">FileModule</a> :<a name="l00030"></a>00030 <span class="keyword">public</span> pion::<a class="code" href="classpion_1_1_h_t_t_p_module.html#358332a4ee0995e43c031df6101da8c2" title="default constructor">HTTPModule</a><a name="l00031"></a>00031 {<a name="l00032"></a>00032 <span class="keyword">public</span>:<a name="l00033"></a>00033 <a name="l00035"></a><a class="code" href="class_file_module_1_1_directory_not_found_exception.html">00035</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_directory_not_found_exception.html" title="exception thrown if the directory configured is not found">DirectoryNotFoundException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00036"></a>00036 <span class="keyword">public</span>:<a name="l00037"></a><a class="code" href="class_file_module_1_1_directory_not_found_exception.html#4c431c7f7de9aba508189c9fa85a55f1">00037</a> <a class="code" href="class_file_module_1_1_directory_not_found_exception.html#4c431c7f7de9aba508189c9fa85a55f1">DirectoryNotFoundException</a>(<span class="keyword">const</span> std::string& dir)<a name="l00038"></a>00038 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule directory not found: "</span>, dir) {}<a name="l00039"></a>00039 };<a name="l00040"></a>00040 <a name="l00042"></a><a class="code" href="class_file_module_1_1_not_a_directory_exception.html">00042</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_not_a_directory_exception.html" title="exception thrown if the directory configuration option is not a directory">NotADirectoryException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00043"></a>00043 <span class="keyword">public</span>:<a name="l00044"></a><a class="code" href="class_file_module_1_1_not_a_directory_exception.html#d991c361442b00979e1475122d56b74e">00044</a> <a class="code" href="class_file_module_1_1_not_a_directory_exception.html#d991c361442b00979e1475122d56b74e">NotADirectoryException</a>(<span class="keyword">const</span> std::string& dir)<a name="l00045"></a>00045 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule option is not a directory: "</span>, dir) {}<a name="l00046"></a>00046 };<a name="l00047"></a>00047 <a name="l00049"></a><a class="code" href="class_file_module_1_1_file_not_found_exception.html">00049</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_file_not_found_exception.html" title="exception thrown if the file configured is not found">FileNotFoundException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00050"></a>00050 <span class="keyword">public</span>:<a name="l00051"></a><a class="code" href="class_file_module_1_1_file_not_found_exception.html#764852b39072cad71d07956a742ce1db">00051</a> <a class="code" href="class_file_module_1_1_file_not_found_exception.html#764852b39072cad71d07956a742ce1db">FileNotFoundException</a>(<span class="keyword">const</span> std::string& file)<a name="l00052"></a>00052 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule file not found: "</span>, file) {}<a name="l00053"></a>00053 };<a name="l00054"></a>00054 <a name="l00056"></a><a class="code" href="class_file_module_1_1_not_a_file_exception.html">00056</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_not_a_file_exception.html" title="exception thrown if the file configuration option is not a file">NotAFileException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00057"></a>00057 <span class="keyword">public</span>:<a name="l00058"></a><a class="code" href="class_file_module_1_1_not_a_file_exception.html#b2b69886f89e541e0f08f95e759f73d8">00058</a> <a class="code" href="class_file_module_1_1_not_a_file_exception.html#b2b69886f89e541e0f08f95e759f73d8">NotAFileException</a>(<span class="keyword">const</span> std::string& file)<a name="l00059"></a>00059 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule option is not a file: "</span>, file) {}<a name="l00060"></a>00060 };<a name="l00061"></a>00061 <a name="l00063"></a><a class="code" href="class_file_module_1_1_invalid_cache_exception.html">00063</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_invalid_cache_exception.html" title="exception thrown if the cache option is set to an invalid value">InvalidCacheException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00064"></a>00064 <span class="keyword">public</span>:<a name="l00065"></a><a class="code" href="class_file_module_1_1_invalid_cache_exception.html#9346ac330330f948b091820351ed0f99">00065</a> <a class="code" href="class_file_module_1_1_invalid_cache_exception.html#9346ac330330f948b091820351ed0f99">InvalidCacheException</a>(<span class="keyword">const</span> std::string& value)<a name="l00066"></a>00066 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule invalid value for cache option: "</span>, value) {}<a name="l00067"></a>00067 };<a name="l00068"></a>00068 <a name="l00070"></a><a class="code" href="class_file_module_1_1_invalid_scan_exception.html">00070</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_invalid_scan_exception.html" title="exception thrown if the cache option is set to an invalid value">InvalidScanException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00071"></a>00071 <span class="keyword">public</span>:<a name="l00072"></a><a class="code" href="class_file_module_1_1_invalid_scan_exception.html#ee34d3b8f74d40f2c3440d9a170e3010">00072</a> <a class="code" href="class_file_module_1_1_invalid_scan_exception.html#ee34d3b8f74d40f2c3440d9a170e3010">InvalidScanException</a>(<span class="keyword">const</span> std::string& value)<a name="l00073"></a>00073 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule invalid value for scan option: "</span>, value) {}<a name="l00074"></a>00074 };<a name="l00075"></a>00075 <a name="l00077"></a><a class="code" href="class_file_module_1_1_file_read_exception.html">00077</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_file_read_exception.html" title="exception thrown if we are unable to read a file from disk">FileReadException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00078"></a>00078 <span class="keyword">public</span>:<a name="l00079"></a><a class="code" href="class_file_module_1_1_file_read_exception.html#22bde63bb469f7fcbdddc5a0658e7443">00079</a> <a class="code" href="class_file_module_1_1_file_read_exception.html#22bde63bb469f7fcbdddc5a0658e7443">FileReadException</a>(<span class="keyword">const</span> std::string& value)<a name="l00080"></a>00080 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule unable to read file: "</span>, value) {}<a name="l00081"></a>00081 };<a name="l00082"></a>00082 <a name="l00084"></a><a class="code" href="class_file_module_1_1_undefined_response_exception.html">00084</a> <span class="keyword">class </span><a class="code" href="class_file_module_1_1_undefined_response_exception.html" title="exception thrown if we do not know how to response (should never happen)">UndefinedResponseException</a> : <span class="keyword">public</span> pion::PionException {<a name="l00085"></a>00085 <span class="keyword">public</span>:<a name="l00086"></a><a class="code" href="class_file_module_1_1_undefined_response_exception.html#c684cb1724df6ce399e928af9fa72285">00086</a> <a class="code" href="class_file_module_1_1_undefined_response_exception.html#c684cb1724df6ce399e928af9fa72285">UndefinedResponseException</a>(<span class="keyword">const</span> std::string& value)<a name="l00087"></a>00087 : pion::<a class="code" href="classpion_1_1_pion_exception.html#6ce1758c4052900220df9ed29404424b">PionException</a>(<span class="stringliteral">"FileModule has an undefined response: "</span>, value) {}<a name="l00088"></a>00088 };<a name="l00089"></a>00089 <a name="l00090"></a>00090
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -