title: Implementing a File Object (C++)
body: <p>I've been looking over the Doom 3 SDK code, specifically their File System implementation.  </p>
  
  <p>The system works (the code I have access to at least) by passing around an 'idFile' object and I've noticed that this class provides read <em>and</em> write methods as well as maintaining a FILE* member.  </p>
  
  <p>This suggests to me that either the FILE* is 'opened' with read and write access <em>or</em> the file is closed and reopened (with the appropriate access) between calls to Read() and Write().<br>
  Does this sound correct or am I over simplifying it?<br>
  If this isn't the case (which part of me suspects it isn't - due to speed etc.) does anyone have any suggestions as to how they would achieve this elegant interface?</p>
  
  <p>Please bare in mind that I am fairly new to both C++ and stdio (which I'm pretty sure iD favours).</p>