blocxx

FileSystemMockObject.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2005, Quest Software, Inc. All rights reserved.
00003 * Copyright (C) 2006, Novell, Inc. All rights reserved.
00004 * 
00005 * Redistribution and use in source and binary forms, with or without
00006 * modification, are permitted provided that the following conditions are met:
00007 * 
00008 *     * Redistributions of source code must retain the above copyright notice,
00009 *       this list of conditions and the following disclaimer.
00010 *     * Redistributions in binary form must reproduce the above copyright
00011 *       notice, this list of conditions and the following disclaimer in the
00012 *       documentation and/or other materials provided with the distribution.
00013 *     * Neither the name of 
00014 *       Quest Software, Inc., 
00015 *       nor Novell, Inc., 
00016 *       nor the names of its contributors or employees may be used to 
00017 *       endorse or promote products derived from this software without 
00018 *       specific prior written permission.
00019 * 
00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00022 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00023 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00024 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00025 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00026 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00027 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00028 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00029 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00030 * POSSIBILITY OF SUCH DAMAGE.
00031 *******************************************************************************/
00032 
00033 
00038 #include "blocxx/BLOCXX_config.h"
00039 #include "blocxx/FileSystemMockObject.hpp"
00040 #include "blocxx/Exception.hpp"
00041 #include "blocxx/File.hpp"
00042 #include "blocxx/String.hpp"
00043 #include "blocxx/Array.hpp"
00044 
00045 namespace BLOCXX_NAMESPACE
00046 {
00047 
00048 BLOCXX_DECLARE_EXCEPTION(FileSystemMockObjectUnimplemented);
00049 BLOCXX_DEFINE_EXCEPTION(FileSystemMockObjectUnimplemented);
00050 
00051 FileSystemMockObject::~FileSystemMockObject()
00052 {
00053 }
00054 
00055 File 
00056 FileSystemMockObject::openFile(const String& path)
00057 {
00058    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "openFile");
00059 }
00060 File 
00061 FileSystemMockObject::createFile(const String& path)
00062 {
00063    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "createFile");
00064 }
00065 File 
00066 FileSystemMockObject::openOrCreateFile(const String& path)
00067 {
00068    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "openOrCreateFile");
00069 }
00070 File 
00071 FileSystemMockObject::openForAppendOrCreateFile(const String& path)
00072 {
00073    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "openForAppendOrCreateFile");
00074 }
00075 File 
00076 FileSystemMockObject::createTempFile(String& filePath, const String& dir)
00077 {
00078    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "createTempFile");
00079 }
00080 File 
00081 FileSystemMockObject::createTempFile(const String& dir)
00082 {
00083    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "createTempFile");
00084 }
00085 int 
00086 FileSystemMockObject::changeFileOwner(const String& filename,  const UserId& userId)
00087 {
00088    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "changeFileOwner");
00089 }
00090 bool 
00091 FileSystemMockObject::exists(const String& path)
00092 {
00093    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "exists");
00094 }
00095 #ifndef BLOCXX_WIN32
00096 bool 
00097 FileSystemMockObject::isExecutable(const String& path)
00098 {
00099    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "isExecutable");
00100 }
00101 #endif
00102 bool 
00103 FileSystemMockObject::canRead(const String& path)
00104 {
00105    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "canRead");
00106 }
00107 bool 
00108 FileSystemMockObject::canWrite(const String& path)
00109 {
00110    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "canWrite");
00111 }
00112 #ifndef BLOCXX_WIN32
00113 bool 
00114 FileSystemMockObject::isLink(const String& path)
00115 {
00116    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "isLink");
00117 }
00118 #endif
00119 bool 
00120 FileSystemMockObject::isDirectory(const String& path)
00121 {
00122    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "isDirectory");
00123 }
00124 bool 
00125 FileSystemMockObject::changeDirectory(const String& path)
00126 {
00127    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "changeDirectory");
00128 }
00129 bool 
00130 FileSystemMockObject::makeDirectory(const String& path, int mode)
00131 {
00132    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "makeDirectory");
00133 }
00134 bool 
00135 FileSystemMockObject::getFileSize(const String& path, Int64& size)
00136 {
00137    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "getFileSize");
00138 }
00139 UInt64 
00140 FileSystemMockObject::fileSize(FileHandle fh)
00141 {
00142    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "fileSize");
00143 }
00144 bool 
00145 FileSystemMockObject::removeDirectory(const String& path)
00146 {
00147    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "removeDirectory");
00148 }
00149 bool 
00150 FileSystemMockObject::removeFile(const String& path)
00151 {
00152    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "removeFile");
00153 }
00154 bool 
00155 FileSystemMockObject::getDirectoryContents(const String& path, StringArray& dirEntries)
00156 {
00157    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "getDirectoryContents");
00158 }
00159 bool 
00160 FileSystemMockObject::renameFile(const String& oldFileName, const String& newFileName)
00161 {
00162    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "renameFile");
00163 }
00164 size_t 
00165 FileSystemMockObject::read(const FileHandle& hdl, void* bfr, size_t numberOfBytes, Int64 offset)
00166 {
00167    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "read");
00168 }
00169 size_t 
00170 FileSystemMockObject::write(FileHandle hdl, const void* bfr, size_t numberOfBytes, Int64 offset)
00171 {
00172    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "write");
00173 }
00174 Int64 
00175 FileSystemMockObject::seek(const FileHandle& hdl, Int64 offset, int whence)
00176 {
00177    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "seek");
00178 }
00179 Int64 
00180 FileSystemMockObject::tell(const FileHandle& hdl)
00181 {
00182    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "tell");
00183 }
00184 void 
00185 FileSystemMockObject::rewind(const FileHandle& hdl)
00186 {
00187    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "rewind");
00188 }
00189 int 
00190 FileSystemMockObject::close(const FileHandle& hdl)
00191 {
00192    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "close");
00193 }
00194 int 
00195 FileSystemMockObject::flush(FileHandle& hdl)
00196 {
00197    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "flush");
00198 }
00199 String 
00200 FileSystemMockObject::getFileContents(const String& filename)
00201 {
00202    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "getFileContents");
00203 }
00204 StringArray 
00205 FileSystemMockObject::getFileLines(const String& filename)
00206 {
00207    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "getFileLines");
00208 }
00209 String 
00210 FileSystemMockObject::readSymbolicLink(const String& path)
00211 {
00212    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "readSymbolicLink");
00213 }
00214 String 
00215 FileSystemMockObject::realPath(const String& path)
00216 {
00217    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "realPath");
00218 }
00219 
00220 std::pair<FileSystem::Path::ESecurity, String> 
00221 FileSystemMockObject::security(String const & path, UserId uid)
00222 {
00223    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "security");
00224 }
00225 
00226 std::pair<FileSystem::Path::ESecurity, String> 
00227 FileSystemMockObject::security(String const & path)
00228 {
00229    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "security");
00230 }
00231 
00232 std::pair<FileSystem::Path::ESecurity, String>
00233 FileSystemMockObject::security(String const & base_dir, String const & rel_path, UserId uid)
00234 {
00235    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "security");
00236 }
00237 
00238 std::pair<FileSystem::Path::ESecurity, String> 
00239 FileSystemMockObject::security(String const & base_dir, String const & rel_path)
00240 {
00241    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "security");
00242 }
00243 
00244 String 
00245 FileSystemMockObject::dirname(const String& filename)
00246 {
00247    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "dirname");
00248 }
00249 
00250 String 
00251 FileSystemMockObject::basename(const String& filename)
00252 {
00253    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "basename");
00254 }
00255 
00256 String 
00257 FileSystemMockObject::getCurrentWorkingDirectory()
00258 {
00259    BLOCXX_THROW(FileSystemMockObjectUnimplementedException, "getCurrentWorkingDirectory");
00260 }
00261 
00262 
00263 } // end namespace BLOCXX_NAMESPACE
00264 
00265 
00266 
00267