COutputStream.h 749 B

1234567891011121314151617181920212223242526272829303132
  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. VCMI_LIB_NAMESPACE_BEGIN
  13. /**
  14. * Abstract class which provides method definitions for writing into a stream.
  15. */
  16. class DLL_LINKAGE COutputStream : public virtual CStream
  17. {
  18. public:
  19. /**
  20. * Write n bytes from the stream into the data buffer.
  21. *
  22. * @param data A pointer to the destination data array.
  23. * @param size The number of bytes to write.
  24. * @return the number of bytes written actually.
  25. */
  26. virtual si64 write(const ui8 * data, si64 size) = 0;
  27. };
  28. VCMI_LIB_NAMESPACE_END