IMemoryReadFile.h 738 B

123456789101112131415161718192021222324252627
  1. // Copyright Michael Zeilfelder
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #pragma once
  5. #include "IReadFile.h"
  6. namespace irr
  7. {
  8. namespace io
  9. {
  10. //! Interface providing read access to a memory read file.
  11. class IMemoryReadFile : public IReadFile
  12. {
  13. public:
  14. //! Get direct access to internal buffer of memory block used as file.
  15. /** It's usually better to use the IReadFile functions to access
  16. the file content. But as that buffer exist over the full life-time
  17. of a CMemoryReadFile, it's sometimes nice to avoid the additional
  18. data-copy which read() needs.
  19. */
  20. virtual const void *getBuffer() const = 0;
  21. };
  22. } // end namespace io
  23. } // end namespace irr