COutputStream.h 750 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * COutputStream.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "CStream.h"
  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. };