Move buffering logic from RageFile into RageFileObj.
Common file interface class, RageBasicFile, shared by RageFile and RageFileObj. This makes most uses of these objects interchangeable. RageFile is now just a simple wrapper for RageFileObj, to create files in FILEMAN's namespace; file objects can also be created independently. This means that, for example, IniFile can be used to write a file to a CString, without having to jump through hoops, and without having to use a separate file access wrapper; just do something like: RageFileObjMem string_file; ini.WriteFile( string ); const CString &sString = string_file.GetString();
This commit is contained in:
@@ -84,7 +84,7 @@ public:
|
||||
int ReadInternal( void *pBuffer, size_t iBytes );
|
||||
int WriteInternal( const void *pBuffer, size_t iBytes ) { SetError( "Not implemented" ); return -1; }
|
||||
int SeekInternal( int iOffset );
|
||||
int GetFileSize() { return info.uncompr_size; }
|
||||
int GetFileSize() const { return info.uncompr_size; }
|
||||
RageFileObj *Copy() const
|
||||
{
|
||||
RageException::Throw( "Loading ZIPs from deflated ZIPs is currently disabled; see RageFileObjZipDeflated" );
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
int WriteInternal( const void *pBuffer, size_t iBytes ) { SetError( "Not implemented" ); return -1; }
|
||||
|
||||
int SeekInternal( int iOffset );
|
||||
int GetFileSize() { return info.uncompr_size; }
|
||||
int GetFileSize() const { return info.uncompr_size; }
|
||||
|
||||
RageFileObj *Copy() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user