Class Index Cross Index Namespace Index

Class General::_Filebuf_base


Contained in: General
Derived from: none
Derived by: none

#include "general/fstream.hh"


public function member index:

_Filebuf_base();
bool _M_close();
std::streamoff _M_file_size();
std::streamoff _M_get_offset(char* __first, char* __last);
bool _M_in_binary_mode() const;
void* _M_mmap(std::streamoff __offset, std::streamoff __len);
bool _M_open(const char*, std::ios_base::openmode, long __protection);
bool _M_open(const char*, std::ios_base::openmode);
bool _M_open(int __id, std::ios_base::openmode = m_default_openmode);
ptrdiff_t _M_read(char* __buf, ptrdiff_t __n);
std::streamoff _M_seek(std::streamoff __offset, std::ios_base::seekdir __dir);
void _M_unmap(void* __mmap_base, std::streamoff __len);
bool _M_write(char* __buf, ptrdiff_t __n);
 

protected function member index:

_STLP_fd __get_fd() const;
bool __is_open() const;
int __o_mode() const;
public : static size_t __page_size();
bool __regular_file() const;
bool __should_close() const;
 

Description:

Class _Filebuf_base, a private base class to factor out the system- dependent code from basic_filebuf<>.


Function Member Descriptions:


General::_Filebuf_base::_Filebuf_base


_Filebuf_base();



General::_Filebuf_base::_M_close


bool _M_close();



General::_Filebuf_base::_M_file_size


std::streamoff _M_file_size();



General::_Filebuf_base::_M_get_offset


std::streamoff _M_get_offset(char* __first, char* __last);
Returns a value n such that, if pos is the file pointer at the beginning of the range [first, last), pos + n is the file pointer at the end. On many operating systems n == __last - __first. In Unix, writing n characters always bumps the file position by n. In Windows text mode, however, it bumps the file position by n + m, where m is the number of newlines in the range. That's because an internal \n corresponds to an external two-character sequence.




General::_Filebuf_base::_M_in_binary_mode


bool _M_in_binary_mode() const;
Returns true if we're in binary mode or if we're using an OS or file system where there is no distinction between text and binary mode.




General::_Filebuf_base::_M_mmap


void* _M_mmap(std::streamoff __offset, std::streamoff __len);
Memory-mapped I/O.




General::_Filebuf_base::_M_open


bool _M_open(const char*, std::ios_base::openmode, long __protection);



General::_Filebuf_base::_M_open


bool _M_open(const char*, std::ios_base::openmode);



General::_Filebuf_base::_M_open


bool _M_open(int __id, std::ios_base::openmode = m_default_openmode);



General::_Filebuf_base::_M_read


ptrdiff_t _M_read(char* __buf, ptrdiff_t __n);
Low-level I/O, like Unix read/write




General::_Filebuf_base::_M_seek


std::streamoff _M_seek(std::streamoff __offset, std::ios_base::seekdir __dir);



General::_Filebuf_base::_M_unmap


void _M_unmap(void* __mmap_base, std::streamoff __len);



General::_Filebuf_base::_M_write


bool _M_write(char* __buf, ptrdiff_t __n);



General::_Filebuf_base::__get_fd


_STLP_fd __get_fd() const;



General::_Filebuf_base::__is_open


bool __is_open() const;



General::_Filebuf_base::__o_mode


int __o_mode() const;



General::_Filebuf_base::__page_size


public : static size_t __page_size();



General::_Filebuf_base::__regular_file


bool __regular_file() const;



General::_Filebuf_base::__should_close


bool __should_close() const;



Variable Member Descriptions:


General::_Filebuf_base::_M_file -

FILE* _M_file;
for stdio, the whole FILE* is being kept here


General::_Filebuf_base::_M_file_id -

_STLP_fd _M_file_id;
Data members.


General::_Filebuf_base::_M_is_open -

unsigned char _M_is_open;

General::_Filebuf_base::_M_openmode -

std::ios_base::openmode _M_openmode;

General::_Filebuf_base::_M_page_size -

static size_t _M_page_size;
Static data members.


General::_Filebuf_base::_M_regular_file -

unsigned char _M_regular_file;

General::_Filebuf_base::_M_should_close -

unsigned char _M_should_close;

General::_Filebuf_base::_M_view_id -

void* _M_view_id;

General::_Filebuf_base::m_default_openmode -

static const std::ios_base::openmode m_default_openmode;
Opening and closing files.