IMemoryReadFile.h 859 B

12345678910111213141516171819202122232425262728293031
  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. #ifndef IRR_I_MEMORY_READ_FILE_H_INCLUDED
  5. #define IRR_I_MEMORY_READ_FILE_H_INCLUDED
  6. #include "IReadFile.h"
  7. namespace irr
  8. {
  9. namespace io
  10. {
  11. //! Interface providing read access to a memory read file.
  12. class IMemoryReadFile : public IReadFile
  13. {
  14. public:
  15. //! Get direct access to internal buffer of memory block used as file.
  16. /** It's usually better to use the IReadFile functions to access
  17. the file content. But as that buffer exist over the full life-time
  18. of a CMemoryReadFile, it's sometimes nice to avoid the additional
  19. data-copy which read() needs.
  20. */
  21. virtual const void *getBuffer() const = 0;
  22. };
  23. } // end namespace io
  24. } // end namespace irr
  25. #endif