| 1 |
/* |
| 2 |
* mptFileIO.h |
| 3 |
* ----------- |
| 4 |
* Purpose: |
| 5 |
* Notes : You should only ever use these wrappers instead of plain std::fstream classes. |
| 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 |
#if defined(MPT_ENABLE_FILEIO) |
| 15 |
|
| 16 |
#include "mpt/io_file_read/inputfile_filecursor.hpp" |
| 17 |
|
| 18 |
#include "../common/mptPathString.h" |
| 19 |
#include "../common/FileReaderFwd.h" |
| 20 |
|
| 21 |
#include <utility> |
| 22 |
|
| 23 |
#endif // MPT_ENABLE_FILEIO |
| 24 |
|
| 25 |
|
| 26 |
OPENMPT_NAMESPACE_BEGIN |
| 27 |
|
| 28 |
|
| 29 |
#if defined(MPT_ENABLE_FILEIO) |
| 30 |
|
| 31 |
|
| 32 |
template <typename Targ1> |
| 33 |
inline FileCursor GetFileReader(Targ1 &&arg1) |
| 34 |
{ |
| 35 |
return mpt::IO::make_FileCursor<mpt::PathString>(std::forward<Targ1>(arg1)); |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
template <typename Targ1, typename Targ2> |
| 40 |
inline FileCursor GetFileReader(Targ1 &&arg1, Targ2 &&arg2) |
| 41 |
{ |
| 42 |
return mpt::IO::make_FileCursor<mpt::PathString>(std::forward<Targ1>(arg1), std::forward<Targ2>(arg2)); |
| 43 |
} |
| 44 |
|
| 45 |
|
| 46 |
#endif // MPT_ENABLE_FILEIO |
| 47 |
|
| 48 |
|
| 49 |
OPENMPT_NAMESPACE_END |
| 50 |
|