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:
Glenn Maynard
2004-12-10 08:48:18 +00:00
parent 4feb167b6e
commit 287a150db7
7 changed files with 421 additions and 355 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ public:
return m_iFilePos;
}
int GetFileSize()
int GetFileSize() const
{
LockMut(m_pFile->m_Mutex);
return m_pFile->m_sBuf.size();