1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00
OpenMW/components/files/constrainedfilestream.hpp
elsid bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00

26 lines
651 B
C++

#ifndef OPENMW_CONSTRAINEDFILESTREAM_H
#define OPENMW_CONSTRAINEDFILESTREAM_H
#include "constrainedfilestreambuf.hpp"
#include "streamwithbuffer.hpp"
#include <iosfwd>
#include <memory>
#include <limits>
#include <string>
namespace Files
{
/// A file stream constrained to a specific region in the file, specified by the 'start' and 'length' parameters.
using ConstrainedFileStream = StreamWithBuffer<ConstrainedFileStreamBuf>;
typedef std::unique_ptr<std::istream> IStreamPtr;
IStreamPtr openConstrainedFileStream(const std::string& filename, std::size_t start = 0,
std::size_t length = std::numeric_limits<std::size_t>::max());
}
#endif