1 #ifndef IOUTILITIES_NATIVE_FILE_STREAM 2 #define IOUTILITIES_NATIVE_FILE_STREAM 6 #ifdef CPP_UTILITIES_USE_NATIVE_FILE_BUFFER 17 #ifdef CPP_UTILITIES_USE_NATIVE_FILE_BUFFER 28 void open(
const std::string &path, std::ios_base::openmode openMode);
29 void openFromFileDescriptor(
int fileDescriptor, std::ios_base::openmode openMode);
33 static std::unique_ptr<std::basic_streambuf<char>> makeFileBuffer(
const std::string &path, ios_base::openmode openMode);
34 static std::unique_ptr<std::basic_streambuf<char>> makeFileBuffer(
int fileDescriptor, ios_base::openmode openMode);
35 #ifdef PLATFORM_WINDOWS 36 static std::unique_ptr<wchar_t[]> makeWidePath(
const std::string &path);
40 void setFileBuffer(std::unique_ptr<std::basic_streambuf<char>> buffer);
42 std::unique_ptr<std::basic_streambuf<char>> m_filebuf;
55 openFromFileDescriptor(fileDescriptor, openMode);
63 inline FILE NativeFileStream::fileHandle()
68 #else // CPP_UTILITIES_USE_NATIVE_FILE_BUFFER 76 #endif // IOUTILITIES_NATIVE_FILE_STREAM std::fstream NativeFileStream
Contains utility classes helping to read and write streams.
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.