Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

RageFileDriverSlice.h

Go to the documentation of this file.
00001 /* RageFileDriverSlice - Treat a portion of a file as a file. */ 00002 00003 #ifndef RAGE_FILE_DRIVER_SLICE_H 00004 #define RAGE_FILE_DRIVER_SLICE_H 00005 00006 #include "RageFileBasic.h" 00007 00008 class RageFileDriverSlice: public RageFileObj 00009 { 00010 public: 00011 /* pFile will be freed. */ 00012 RageFileDriverSlice( RageFileBasic *pFile, int iOffset, int iFileSize ); 00013 ~RageFileDriverSlice(); 00014 RageFileBasic *Copy() const; 00015 00016 void DeleteFileWhenFinished() { m_bFileOwned = true; } 00017 00018 int ReadInternal( void *pBuffer, size_t iBytes ); 00019 int WriteInternal( const void *pBuffer, size_t iBytes ) { SetError( "Not implemented" ); return -1; } 00020 int SeekInternal( int iOffset ); 00021 int GetFileSize() const { return m_iFileSize; } 00022 00023 private: 00024 RageFileBasic *m_pFile; 00025 int m_iFilePos; 00026 int m_iOffset, m_iFileSize; 00027 bool m_bFileOwned; 00028 }; 00029 00030 #endif 00031 00032 /* 00033 * Copyright (c) 2003-2004 Glenn Maynard 00034 * All rights reserved. 00035 * 00036 * Permission is hereby granted, free of charge, to any person obtaining a 00037 * copy of this software and associated documentation files (the 00038 * "Software"), to deal in the Software without restriction, including 00039 * without limitation the rights to use, copy, modify, merge, publish, 00040 * distribute, and/or sell copies of the Software, and to permit persons to 00041 * whom the Software is furnished to do so, provided that the above 00042 * copyright notice(s) and this permission notice appear in all copies of 00043 * the Software and that both the above copyright notice(s) and this 00044 * permission notice appear in supporting documentation. 00045 * 00046 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00047 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00048 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00049 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00050 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00051 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00052 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00053 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00054 * PERFORMANCE OF THIS SOFTWARE. 00055 */ 00056

Generated on Thu Jan 27 20:57:28 2005 for StepMania by doxygen 1.3.7