Core/Enum: Convert OpenMode and StreamOption to the new flags system

This commit is contained in:
Lynix
2016-11-27 13:40:47 +01:00
parent 1a5617bc55
commit a34d1e410c
17 changed files with 78 additions and 60 deletions

View File

@@ -32,8 +32,8 @@ namespace Nz
virtual UInt64 GetCursorPos() const = 0;
virtual String GetDirectory() const;
virtual String GetPath() const;
inline UInt32 GetOpenMode() const;
inline UInt32 GetStreamOptions() const;
inline OpenModeFlags GetOpenMode() const;
inline StreamOptionFlags GetStreamOptions() const;
virtual UInt64 GetSize() const = 0;
@@ -55,14 +55,14 @@ namespace Nz
Stream& operator=(Stream&&) = default;
protected:
inline Stream(UInt32 streamOptions = StreamOption_None, UInt32 openMode = OpenMode_NotOpen);
inline Stream(StreamOptionFlags streamOptions = StreamOption_None, OpenModeFlags openMode = OpenMode_NotOpen);
virtual void FlushStream() = 0;
virtual std::size_t ReadBlock(void* buffer, std::size_t size) = 0;
virtual std::size_t WriteBlock(const void* buffer, std::size_t size) = 0;
UInt32 m_openMode;
UInt32 m_streamOptions;
OpenModeFlags m_openMode;
StreamOptionFlags m_streamOptions;
};
}