COutputStream.h 751 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "CStream.h"
  3. /*
  4. * COutputStream.h, part of VCMI engine
  5. *
  6. * Authors: listed in file AUTHORS in main folder
  7. *
  8. * License: GNU General Public License v2.0 or later
  9. * Full text of license available in license.txt file, in main folder
  10. *
  11. */
  12. /**
  13. * Abstract class which provides method definitions for writing into a stream.
  14. */
  15. class DLL_LINKAGE COutputStream : public virtual CStream
  16. {
  17. public:
  18. /**
  19. * D-tor.
  20. */
  21. virtual ~COutputStream() {}
  22. /**
  23. * Write n bytes from the stream into the data buffer.
  24. *
  25. * @param data A pointer to the destination data array.
  26. * @param size The number of bytes to write.
  27. * @return the number of bytes written actually.
  28. */
  29. virtual si64 write(const ui8 * data, si64 size) = 0;
  30. };