OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
constrainedfilestream.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_CONSTRAINEDFILESTREAM_H
2 #define OPENMW_CONSTRAINEDFILESTREAM_H
3 
4 #include <istream>
5 
6 #include <boost/shared_ptr.hpp>
7 
8 namespace Files
9 {
10 
12 class ConstrainedFileStream : public std::istream
13 {
14 public:
15  ConstrainedFileStream(const char *filename,
16  size_t start=0, size_t length=0xFFFFFFFF);
17  virtual ~ConstrainedFileStream();
18 };
19 
20 typedef boost::shared_ptr<std::istream> IStreamPtr;
21 
22 IStreamPtr openConstrainedFileStream(const char *filename, size_t start=0, size_t length=0xFFFFFFFF);
23 
24 }
25 
26 #endif
virtual ~ConstrainedFileStream()
Definition: constrainedfilestream.cpp:111
ConstrainedFileStream(const char *filename, size_t start=0, size_t length=0xFFFFFFFF)
Definition: constrainedfilestream.cpp:105
A file stream constrained to a specific region in the file, specified by the 'start' and 'length' par...
Definition: constrainedfilestream.hpp:12
IStreamPtr openConstrainedFileStream(const char *filename, size_t start, size_t length)
Definition: constrainedfilestream.cpp:117
boost::shared_ptr< std::istream > IStreamPtr
Definition: constrainedfilestream.hpp:20