NGL  6.5
The NCCA Graphics Library
fmt::File Class Reference

#include <posix.h>

+ Collaboration diagram for fmt::File:

Classes

struct  Proxy
 

Public Types

enum  { RDONLY = FMT_POSIX(O_RDONLY), WRONLY = FMT_POSIX(O_WRONLY), RDWR = FMT_POSIX(O_RDWR) }
 

Public Member Functions

 File () FMT_NOEXCEPT
 
 File (CStringRef path, int oflag)
 
 File (Proxy p) FMT_NOEXCEPT
 
 File (File &other) FMT_NOEXCEPT
 
Fileoperator= (Proxy p)
 
Fileoperator= (File &other)
 
 operator Proxy () FMT_NOEXCEPT
 
 ~File () FMT_NOEXCEPT
 
int descriptor () const FMT_NOEXCEPT
 
void close ()
 
LongLong size () const
 
std::size_t read (void *buffer, std::size_t count)
 
std::size_t write (const void *buffer, std::size_t count)
 
void dup2 (int fd)
 
void dup2 (int fd, ErrorCode &ec) FMT_NOEXCEPT
 
BufferedFile fdopen (const char *mode)
 

Static Public Member Functions

static File dup (int fd)
 
static void pipe (File &read_end, File &write_end)
 

Private Member Functions

 File (int fd)
 

Private Attributes

int fd_
 

Detailed Description

Definition at line 181 of file posix.h.

Member Enumeration Documentation

anonymous enum
Enumerator
RDONLY 
WRONLY 
RDWR 

Definition at line 190 of file posix.h.

Constructor & Destructor Documentation

fmt::File::File ( int  fd)
inlineexplicitprivate

Definition at line 186 of file posix.h.

fmt::File::File ( )
inline

Definition at line 197 of file posix.h.

fmt::File::File ( fmt::CStringRef  path,
int  oflag 
)

Definition at line 97 of file posix.cc.

References fmt::BasicCStringRef< Char >::c_str(), FMT_POSIX_CALL, and FMT_RETRY.

+ Here is the call graph for this function:

fmt::File::File ( Proxy  p)
inline

Definition at line 215 of file posix.h.

fmt::File::File ( File other)
inline

Definition at line 218 of file posix.h.

fmt::File::~File ( )

Definition at line 109 of file posix.cc.

References fmt::BufferedFile::close(), FMT_POSIX_CALL, and fmt::report_system_error().

+ Here is the call graph for this function:

Member Function Documentation

void fmt::File::close ( )

Definition at line 116 of file posix.cc.

References fmt::BufferedFile::close(), and FMT_POSIX_CALL.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fmt::File::descriptor ( ) const
inline

Definition at line 266 of file posix.h.

References FMT_DISALLOW_COPY_AND_ASSIGN, FMT_NOEXCEPT, fmt::getpagesize(), fmt::LongLong, and fmt::internal::write().

+ Here is the call graph for this function:

fmt::File fmt::File::dup ( int  fd)
static

Definition at line 169 of file posix.cc.

References fmt::BufferedFile::File, and FMT_POSIX_CALL.

void fmt::File::dup2 ( int  fd)

Definition at line 178 of file posix.cc.

References FMT_POSIX_CALL, and FMT_RETRY.

void fmt::File::dup2 ( int  fd,
ErrorCode ec 
)

Definition at line 187 of file posix.cc.

References FMT_POSIX_CALL, and FMT_RETRY.

fmt::BufferedFile fmt::File::fdopen ( const char *  mode)

Definition at line 217 of file posix.cc.

References FMT_POSIX_CALL.

fmt::File::operator Proxy ( )
inline

Definition at line 239 of file posix.h.

References FMT_DISALLOW_COPY_AND_ASSIGN, and FMT_NOEXCEPT.

File& fmt::File::operator= ( Proxy  p)
inline

Definition at line 223 of file posix.h.

References fmt::File::Proxy::fd.

File& fmt::File::operator= ( File other)
inline

Definition at line 230 of file posix.h.

References fd_.

void fmt::File::pipe ( File read_end,
File write_end 
)
static

Definition at line 194 of file posix.cc.

References close(), fmt::BufferedFile::File, and FMT_POSIX_CALL.

+ Here is the call graph for this function:

std::size_t fmt::File::read ( void buffer,
std::size_t  count 
)

Definition at line 153 of file posix.cc.

References FMT_POSIX_CALL, FMT_RETRY, and fmt::internal::to_unsigned().

+ Here is the call graph for this function:

fmt::LongLong fmt::File::size ( ) const

Definition at line 127 of file posix.cc.

References FMT_POSIX_CALL, FMT_STATIC_ASSERT, FMT_SYSTEM, HANDLE(), fmt::LongLong, and fmt::ULongLong.

+ Here is the call graph for this function:

std::size_t fmt::File::write ( const void buffer,
std::size_t  count 
)

Definition at line 161 of file posix.cc.

References FMT_POSIX_CALL, FMT_RETRY, fmt::internal::to_unsigned(), and fmt::internal::write().

+ Here is the call graph for this function:

Member Data Documentation

int fmt::File::fd_
private

Definition at line 183 of file posix.h.


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