Buffer class for file streams
iostream library  

Standard hierarchy


Public member functions:

filebuf members:
(constructor)Construct object
is_openCheck if file is open
openOpen file
closeClose file
members inherited from streambuf:
pubimbueImbue locale
getlocGet current locale
pubsetbufSet buffer array
pubseekoffSet relative position of internal position pointer
pubseekposSet absolute position of internal position pointer
pubsyncSynchronize stream
in_availGet number of characters available in input buffer
snextcIncrease get pointer and return next character
sbumpcGet current character and increase get pointer
sgetcGet current character
sgetnGet some characters
sputbackcPut character back
sungetcDecrease get pointer
sputcStore character at current put position and increase put pointer
sputnWrite some characters

Protected member functions:

filebuf members:
seekoffSet relative position of internal position pointer [virtual]
seekposSet absolute position of internal position pointer [virtual]
underflowGet current character [virtual]
pbackfailPut character back [virtual]
overflowPut character at current put position [virtual]
syncSynchronize file buffer [virtual]
setbufSet buffer [virtual]
members inherited from streambuf:
ebackGet pointer to beginning of input sequence
egptrGet pointer to end of input seuqence
epptrGet pointer to end of output sequence
gbumpIncrease get pointer
gptrReturn get pointer
pbaseGet pointer to beginning of output sequence
pbumpIncrease put pointer
pptrReturn put pointer
setgSet input buffer pointers
setpSet output buffer pointers
imbueImbue locale [virtual]
showmanycGet number of characters availbale in input sequence [virtual]
uflowGet current character [virtual]
xsgetnGet some characters [virtual]
xsputnWrite some characters [virtual]


  The objects instatiated from this class associate an input and an output sequence with a file, allowing the input and output functionality of streams to be performed on files.
  Every object of this class controls both an input and an output sequence, although some sequence may be restricted depending on the openmode used to open the file with member function open.
  Once an open file is closed (member close) the filebuf object may be used to open other files.
  The state of the filebuf object -wether a file is open or not- may be tested by calling member is_open.
  This class overrides some virtual members inherited from streambuf to provide a specific functionality adapted to file manipulation. Plese refer to parent class streambuf for more information on streambuf-derived objects.

© The C++ Resources Network, 2001