| 1 |
/* |
| 2 |
* FileReaderFwd.h |
| 3 |
* --------------- |
| 4 |
* Purpose: Forward declaration for class FileReader. |
| 5 |
* Notes : (currently none) |
| 6 |
* Authors: OpenMPT Devs |
| 7 |
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details. |
| 8 |
*/ |
| 9 |
|
| 10 |
#pragma once |
| 11 |
|
| 12 |
#include "openmpt/all/BuildSettings.hpp" |
| 13 |
|
| 14 |
#include "mpt/base/namespace.hpp" |
| 15 |
|
| 16 |
namespace mpt { |
| 17 |
inline namespace MPT_INLINE_NS { |
| 18 |
|
| 19 |
template <typename Traits, bool allow_transcode_locale> |
| 20 |
class BasicPathString; |
| 21 |
struct NativePathTraits; |
| 22 |
struct Utf8PathTraits; |
| 23 |
using native_path = BasicPathString<NativePathTraits, true>; |
| 24 |
|
| 25 |
namespace IO { |
| 26 |
|
| 27 |
class FileCursorTraitsMemory; |
| 28 |
|
| 29 |
class FileCursorTraitsFileData; |
| 30 |
|
| 31 |
class FileCursorFilenameTraitsNone; |
| 32 |
|
| 33 |
template <typename Tpath> |
| 34 |
class FileCursorFilenameTraits; |
| 35 |
|
| 36 |
template <typename Ttraits, typename Tfilenametraits> |
| 37 |
class FileCursor; |
| 38 |
|
| 39 |
} // namespace IO |
| 40 |
|
| 41 |
} // inline namespace MPT_INLINE_NS |
| 42 |
} // namespace mpt |
| 43 |
|
| 44 |
OPENMPT_NAMESPACE_BEGIN |
| 45 |
|
| 46 |
namespace mpt { |
| 47 |
|
| 48 |
} // namespace mpt |
| 49 |
|
| 50 |
namespace detail { |
| 51 |
|
| 52 |
template <typename Ttraits, typename Tfilenametraits> |
| 53 |
using FileCursor = mpt::IO::FileCursor<Ttraits, Tfilenametraits>; |
| 54 |
|
| 55 |
template <typename Ttraits, typename Tfilenametraits> |
| 56 |
class FileReader; |
| 57 |
|
| 58 |
} // namespace detail |
| 59 |
|
| 60 |
namespace mpt { |
| 61 |
#if defined(MPT_ENABLE_CHARSET_LOCALE) |
| 62 |
using PathString = mpt::native_path; |
| 63 |
#else |
| 64 |
using PathString = mpt::BasicPathString<mpt::Utf8PathTraits, false>; |
| 65 |
#endif |
| 66 |
} // namespace mpt |
| 67 |
|
| 68 |
using FileCursor = detail::FileCursor<mpt::IO::FileCursorTraitsFileData, mpt::IO::FileCursorFilenameTraits<mpt::PathString>>; |
| 69 |
using FileReader = detail::FileReader<mpt::IO::FileCursorTraitsFileData, mpt::IO::FileCursorFilenameTraits<mpt::PathString>>; |
| 70 |
|
| 71 |
using MemoryFileCursor = detail::FileCursor<mpt::IO::FileCursorTraitsMemory, mpt::IO::FileCursorFilenameTraitsNone>; |
| 72 |
using MemoryFileReader = detail::FileReader<mpt::IO::FileCursorTraitsMemory, mpt::IO::FileCursorFilenameTraitsNone>; |
| 73 |
|
| 74 |
OPENMPT_NAMESPACE_END |
| 75 |
|