MeshLib Documentation
Loading...
Searching...
No Matches
MR::File Class Reference

the class to open C FILE handle and automatically close it in the destructor More...

#include <MRFile.h>

Public Member Functions

 File ()=default
 
 File (const File &)=delete
 
 File (File &&r)
 
 File (const std::filesystem::path &filename, const char *mode)
 
 ~File ()
 
Fileoperator= (const File &)=delete
 
Fileoperator= (File &&r)
 
 operator FILE * () const
 
MRMESH_API FILE * open (const std::filesystem::path &filename, const char *mode)
 
MRMESH_API void close ()
 
void detach ()
 the user takes control over the handle
 
void attach (FILE *h)
 gives control over the handle to this object
 

Detailed Description

the class to open C FILE handle and automatically close it in the destructor

Constructor & Destructor Documentation

◆ File() [1/4]

MR::File::File ( )
default

◆ File() [2/4]

MR::File::File ( const File & )
delete

◆ File() [3/4]

MR::File::File ( File && r)
inline

◆ File() [4/4]

MR::File::File ( const std::filesystem::path & filename,
const char * mode )
inline

◆ ~File()

MR::File::~File ( )
inline

Member Function Documentation

◆ attach()

void MR::File::attach ( FILE * h)
inline

gives control over the handle to this object

◆ close()

MRMESH_API void MR::File::close ( )

◆ detach()

void MR::File::detach ( )
inline

the user takes control over the handle

◆ open()

MRMESH_API FILE * MR::File::open ( const std::filesystem::path & filename,
const char * mode )

◆ operator FILE *()

MR::File::operator FILE * ( ) const
inline

◆ operator=() [1/2]

File & MR::File::operator= ( const File & )
delete

◆ operator=() [2/2]

File & MR::File::operator= ( File && r)
inline

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