basic_stringbuf
stringbuf
wstringbuf
Buffer class for file streams
iostream library
  cplusplus.com  

Standard hierarchy

streambuf
--->
stringbuf

Public member functions:

stringbuf members:
(constructor)Construct object
strGet/set string content
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:

stringbuf members:
overflowPut character at current put position [virtual]
pbackfailPut character back [virtual]
seekoffSet relative position of internal position pointer [virtual]
seekposSet absolute position of internal position pointer [virtual]
underflowGet current character [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]
setbufSet buffer [virtual]
showmanycGet number of characters availbale in input sequence [virtual]
syncSynchronize file buffer [virtual]
uflowGet current character [virtual]
xsgetnGet some characters [virtual]
xsputnWrite some characters [virtual]

Description

  The objects of this class associate an input and an output sequence with a sequence of characters, allowing the input and output functionality of streams to be performed on strings.
  Every object of this class controls both an input and an output sequence, although some sequence may be restricted depending on the openmode used as constructor parameter.
  The content of the internal sequence of characters may be obtained/replaced by calling member str.
  This class overrides some virtual members inherited from streambuf to provide a specific functionality for strings. Plese refer to parent class streambuf for more information on streambuf-derived objects.


© The C++ Resources Network, 2001