Blender  V3.3
Public Member Functions | List of all members
blender::fstream Class Reference

#include <BLI_fileops.hh>

Inheritance diagram for blender::fstream:

Public Member Functions

 fstream ()=default
 
 fstream (const char *filepath, std::ios_base::openmode mode=ios_base::in|ios_base::out)
 
 fstream (const std::string &filepath, std::ios_base::openmode mode=ios_base::in|ios_base::out)
 
void open (StringRefNull filepath, ios_base::openmode mode=ios_base::in|ios_base::out)
 

Detailed Description

std::fstream subclass that handles UTF-16 encoding on Windows.

For documentation, see https://en.cppreference.com/w/cpp/io/basic_fstream

Definition at line 27 of file BLI_fileops.hh.

Constructor & Destructor Documentation

◆ fstream() [1/3]

blender::fstream::fstream ( )
default

◆ fstream() [2/3]

blender::fstream::fstream ( const char *  filepath,
std::ios_base::openmode  mode = ios_base::in | ios_base::out 
)
explicit

Definition at line 14 of file fileops.cc.

References open().

◆ fstream() [3/3]

blender::fstream::fstream ( const std::string &  filepath,
std::ios_base::openmode  mode = ios_base::in | ios_base::out 
)
explicit

Definition at line 19 of file fileops.cc.

References open().

Member Function Documentation

◆ open()

void blender::fstream::open ( StringRefNull  filepath,
ios_base::openmode  mode = ios_base::in | ios_base::out 
)

Definition at line 24 of file fileops.cc.

References blender::StringRefNull::c_str(), UTF16_ENCODE, and UTF16_UN_ENCODE.

Referenced by fstream().


The documentation for this class was generated from the following files: