CLodStream.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * CLodStream.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 "CInputStream.h"
  12. //#include "CFileInputStream.h"
  13. //#include "CLodArchiveLoader.h"
  14. ///**
  15. // * A class which provides method definitions for reading a file from a LOD archive.
  16. // */
  17. //class DLL_LINKAGE CLodStream : public CInputStream
  18. //{
  19. //public:
  20. // /**
  21. // * Default c-tor.
  22. // */
  23. // CLodStream();
  24. // /**
  25. // * C-tor.
  26. // *
  27. // * @param loader The archive loader object which knows about the structure of the archive format.
  28. // * @param resourceName The resource name which says what resource should be loaded.
  29. // *
  30. // * @throws std::runtime_error if the archive entry wasn't found
  31. // */
  32. // CLodStream(const CLodArchiveLoader * loader, const std::string & resourceName);
  33. // /**
  34. // * Opens a lod stream. It will close any currently opened file stream.
  35. // *
  36. // * @param loader The archive loader object which knows about the structure of the archive format.
  37. // * @param resourceName The resource name which says what resource should be loaded.
  38. // *
  39. // * @throws std::runtime_error if the archive entry wasn't found
  40. // */
  41. // void open(const CLodArchiveLoader * loader, const std::string & resourceName);
  42. // /**
  43. // * Reads n bytes from the stream into the data buffer.
  44. // *
  45. // * Warning: You can't read just a part of the archive entry if it's a decompressed one. So reading the total size always is
  46. // * recommended unless you really know what you're doing e.g. reading from a video stream.
  47. // *
  48. // * @param data A pointer to the destination data array.
  49. // * @param size The number of bytes to read.
  50. // * @return the number of bytes read actually.
  51. // *
  52. // * @throws std::runtime_error if the file decompression was not successful
  53. // */
  54. // si64 read(ui8 * data, si64 size);
  55. // /**
  56. // * Seeks the internal read pointer to the specified position.
  57. // *
  58. // * @param position The read position from the beginning.
  59. // * @return the position actually moved to, -1 on error.
  60. // */
  61. // si64 seek(si64 position);
  62. // /**
  63. // * Gets the current read position in the stream.
  64. // *
  65. // * @return the read position.
  66. // */
  67. // si64 tell();
  68. // /**
  69. // * Skips delta numbers of bytes.
  70. // *
  71. // * @param delta The count of bytes to skip.
  72. // * @return the count of bytes skipped actually.
  73. // */
  74. // si64 skip(si64 delta);
  75. // /**
  76. // * Gets the length in bytes of the stream.
  77. // *
  78. // * @return the length in bytes of the stream.
  79. // */
  80. // si64 getSize();
  81. // /**
  82. // * Closes the stream and releases any system resources associated with the stream explicitely.
  83. // */
  84. // void close();
  85. //private:
  86. // /** The file stream for reading from the LOD archive. */
  87. // std::unique_ptr<CInputStream> fileStream;
  88. // /** Offset of data in input stream. Used if input stream represents whole file*/
  89. // size_t offset;
  90. // /** Size of our data in input stream. */
  91. // size_t size;
  92. //};