============
  IOSTREAM.H
 ============
Declares the C++ version 2.0 basic streams.

 Classes
 =======
To get more Help on the classes in the
IOSTREAM.H header file (and their attendant
member functions and data members), choose
one of these Help links:

  ios                
  iostream           
  iostream_withassign
  istream            
  istream_withassign 
  ostream            
  ostream_withassign 
  streambuf          

 See Also
 ========
  List of all Header files
  Streamable Classes      


=========== IOMANIP.H =========== Declares the C++ streams I/O manipulators and contains macros for creating paramaterized manipulators. Includes ======== GENERIC.H IOSTREAM.H Classes ======= IAPP IOAPP OAPP SAPP IMANIP IOMANIP OMANIP SMANIP Overloaded operators ==================== << >> See Also ======== List of all header files Streamable Classes
Alphabetical Listing of IOStreams Classes =========================================== This Help screen is an alphabetical list of the IOStreams streamable classes. See Also: Streamable Data Members Streamable Member Functions Streamable Constructors and Destructors C++ Streams --------------------+----------------------+----------------------+ conbuf | constream | filebuf | fstream | fstreambase | ifstream | ios | iostream_withassign| iostream | istream_withassign | istream | istrstream | ofstream | ostream_withassign | ostream | ostrstream | streambuf | strstream | strstreambase | strstreambuf |
IOStreams Data Members ======================== This Help screen is an alphabetical list of the IOStreams data members. See Also: Streamable Classes Streamable Member Functions ------------+--------------+--------------+--------------+--------------+ adjustfield| basefield | bp | floatfield | state | x_fill | x_flags | x_precision| x_width |
IOStreams Member Functions ============================ This Help screen is an alphabetical list of the IOStreams member functions. See Also: Streamable Classes Streamable Data Members Streamable Constructors ----------------+------------------+------------------+------------------+ allocate | attach | bad | base | bitalloc | blen | clear | close | do_sgetn | doallocate | eback | ebuf | egptr | eof | epptr | fail | fd | fill | flags | flush | freeze | gbump | gcount | get | getline | good | gptr | ignore | in_avail | init | is_open | open | out_waiting | overflow | pbackfail | pbase | pbump | pcount | peek | pptr | precision | put | putback | rdbuf | rdstate | read | sbumpc | seekg | seekoff | seekp | seekpos | setb | setbuf | setf | setg | setp | setstate | sgetc | sgetn | snextc | so_sputn | sputbackc | sputc | sputn | stossc | str | sync_with_stdio| sync | tellg | tellp | tie | unbuffered | underflow | unsetf | width | write | xalloc |
IOStream Constructors and Destructors ======================================= This Help screen is an alphabetical list of the IOStream constructors (and some of the destructors). If the destructor you want Help on is not listed here, it is declared in the header file of its class, or is inherited from the base class of that class. This is a destructor's typical syntax: classname::~classname(); Most destructors don't do anything special. They only destroy objects of their own class. --------------------+----------------------+----------------------+ conbuf | constream | filebuf | ~filebuf | fstreambase | fstream | ifstream | ios | iostream_withassign| iostream | istream_withassign | istream | istrstream | ofstream | ostream_withassign | ostream | ostrstream | streambuf | strstreambase | strstreambuf | strstream | See Also: Streamable Classes Streamable Member Functions About Constructors and Destructors
attach (member function) ========================== filebuf::attach fstreambase::attach
doallocate (member function) =============================== streambuf::doallocate strstreambuf::doallocate
init (member function) ======================== ios::init strstreambuf::init
overflow (member function) ============================ filebuf::overflow streambuf::overflow strstreambuf::overflow
rdbuf (member function) ========================= constream::rdbuf fstream::rdbuf fstreambase::rdbuf ifstream::rdbuf ios::rdbuf ofstream::rdbuf strstreambase::rdbuf
seekoff (member function) =========================== filebuf::seekoff streambuf::seekoff strstreambuf::seekoff
str (member function) ======================= ostrstream::str strstream::str strstreambuf::str
sync (member function) ======================== filebuf::sync streambuf::sync
underflow (member function) ============================= filebuf::underflow streambuf::underflow strstreambuf::underflow
allocate ========== To get Help about a specific "allocate" member function, choose one of these Help links: MemBlocks::allocate streambuf::allocate
constructor ============= Constructors are member functions, declared in the header file of their class, or are inherited from the base class of that class. To find out more about constructors, choose this Help link: About Constructors and Destructors To get Help about a specific streamable class constructor or container class constructor (by name), choose one of these Help links: Streamable Class Constructors ============================= filebuf::filebuf fstreambase::fstreambase fstream::fstream ifstream::ifstream ios::ios iostream_withassign::iostream_withassign iostream::iostream istream_withassign::istream_withassign istream::istream istrstream::istrstream ofstream::ofstream ostream_withassign::ostream_withassign ostream::ostream ostrstream::ostrstream streambuf::streambuf strstreambase::strstreambase strstreambuf::strstreambuf strstream::strstream Container Class Constructors ============================ AbstractArray::AbstractArray Array::Array ArrayIterator::ArrayIterator Association::Association Bag::Bag BaseDate::BaseDate BaseTime::BaseTime Btree::Btree BtreeIterator::BtreeIterator Container::Container Date::Date Dictionary::Dictionary DoubleList::DoubleList DoubleListIterator::DoubleListIterator HashTable::HashTable HashTableIterator::HashTableIterator List::List ListIterator::ListIterator Object::Object Set::Set SortedArray::SortedArray String::String Time::Time Timer::Timer TShouldDelete::TShouldDelete
Destructor ============ Destructors are declared in the header file of their class, or are inherited from the base class of that class. This is the typical syntax of a destructor: classname::~classname(); Most destructors don't do anything special. They destroy objects of their own class. To find out more about destructors, choose this Help link: About Constructors and Destructors To get Help about a specific destructor (by name), choose one of these Help links: Streamable Class Destructors ============================ filebuf::~filebuf Container Class Destructors =========================== BaseDate::~BaseDate BtreeIterator::~BtreeIterator Collection::~Collection String::~String
streambuf *rdbuf() ==================== Member functions of the form streambuf *rdbuf() return the pointer to streambuf data member bp of class ios.
===================================== ios class summary (IOSTREAM.H) ===================================== +-----------+ +---------+ | ios |------------------------------------------>|streambuf| +----=-=-=-=+ +---=-=---+ | | | +---------------------------+ +------+ +--+ | | +--------------+ | | | +---+ +---+ | | | | +---+---+ +---+---+ | | | | |istream| |ostream| | | | | +-------+ +-------+ +------+------+ +-----+-----+ +-----+------+ +--+----+ |strstreambase| |fstreambase| |strstreambuf| |filebuf| +-------------+ +-----------+ +------------+ +-------+ Remarks: ios provides operations common to both input and output. The classes derived from ios (istream, ostream, iostream) specialize I/O with high-level formatting operations: * istream does formatted input. * ostream does formatted output. * iostream does formatted input and output. streambuf provides an abstraction for talking to a physical device. Classes derived from it deal with files, memory, etc. ios talks to a streambuf. It maintains information on the state of the streambuf (good, bad, eof, etc.), and maintains flags for use by istream and ostream. Constructors: ios::ios(streambuf *); ios::ios(); Data Members: ios::adjustfield ios::basefield ios::bp ios::floatfield ios::state ios::x_fill ios::x_flags ios::x_precision ios::x_width Member Functions: ios::bad ios::bitalloc ios::clear ios::eof ios::fail ios::fill ios::flags ios::good ios::init ios::ios ios::precision ios::rdbuf ios::rdstate ios::setf ios::setstate ios::sync_with_stdio ios::tie ios::unsetf ios::width ios::xalloc
ios::ios (constructors) ========================= Declarations: Form 1 (public) ios(streambuf *); Form 2 (protected) ios(); See Also: ios
ios::ios, Form 1 (public constructor) ======================================= Declaration: ios(streambuf *); Remarks: Associates a given streambuf with the stream. Associates a given streambuf with a stream by assigning the pointer to streambuf data member of class ios to point to the streambuf passed in as a parameter. See Also: ios constructor, Form 2 ios::ios
ios::ios, Form 2 (protected constructor) ========================================== Declaration: ios(); Remarks: Constructs an ios object that has no corresponding streambuf. A derived class should call ios::init(streambuf *) to provide a streambuf. See Also: ios constructor, Form 1 ios::ios
ios::adjustfield (data member) ================================ Declaration: static const long adjustfield; Remarks: Used with setf to control padding to the left or right, or for internal fill. Example | Result ---------------------------------------------------------+------------------ cout<<setf(ios::left, ios::adjustfield)<<hex<<0xFE; | 000xFE (left) cout<<setf(ios::internal, ios::adjustfield)<<hex<<0xFE; | 0x00FE (internal) See Also: ios
ios::basefield (data member) ============================== Declaration: static const long basefield; Remarks: Used with setf to set the notation to a decimal octal, or hexidecimal base. This example sets a decimal base: cout<<setf(ios::dec, ios::basefield)<<i; See Also: ios
ios::bp (protected data member) ================================ Declaration: streambuf *bp(); Remarks: bp points to the associated streambuf. See Also: ios
ios::floatfield (data member) =============================== Declaration: static const long floatfield; Remarks: Used with setf to set the float point notation to scientific or fixed. This example sets scientific notation: cout<<setf(ios::scientific, ios::floatfield)<<f; See Also: ios
ios::state (protected data member) ==================================== Declaration: int state; Remarks: The current state of the streambuf. See Also: ios
ios::x_fill (protected data member) ===================================== Declaration: int x_fill; Remarks: Used for padding character on output. See Also: ios
ios::x_flags (protected data member) ====================================== Declaration: long x_flags; Remarks: Used for formatting flag bits. See Also: ios
ios::x_precision (protected data member) ========================================== Declaration: int x_precision; Remarks: Used for floating-point precision on output. See Also: ios
ios::x_width (protected data member) ====================================== Declaration: int x_width; Remarks: Used to specify the field width on output. See Also: ios
ios::bad (member function) ============================ Declaration: int bad(); Remarks: Returns nonzero if error occurred; does this by checking ios::badbit and ios::hardfail in ios::state. See Also: ios
ios::bitalloc (member function) ================================= Declaration: static long bitalloc(); Remarks: Acquires a new flag bit set. The return value can be used to set, clear, and test the flag. This is for user-defined formatting flags. See Also: ios
ios::clear (member function) ============================== Declaration: void clear(int = 0); Remarks: Sets the stream state to the given value by setting ios::state to the given value. The constants of the io_state enumeration in class ios are normally used at the parameter. The values of io_state can be ORed together to set more than one bit in 'state'. See Also: ios
ios::eof (member function) ============================ Declaration: int eof(); Remarks: Returns nonzero on end of file; does this by checking the ios::eofbit in ios::state. See Also: ios
ios::fail (member function) ============================= Declaration: int fail(); Remarks: Returns nonzero if an operation failed; does this by checking the ios::failbit, ios::badbit, or ios::hardfail bits in ios::state. See Also: ios
ios::fill (member functions) ============================== Declarations: Form 1 char fill(); Form 2 char fill(char); See Also: ios
ios::fill, Form 1 (member function) ===================================== Declaration: char fill(); Remarks: Returns the current fill character. See Also: ios::fill ios::fill, Form 2
ios::fill, Form 2 (member function) ===================================== Declaration: char fill(char); Remarks: Resets the fill character; returns the previous one. See Also: ios::fill ios::fill, Form 1
ios::flags (member functions) =============================== Declaration: Form 1 long flags(); Form 2 long flags(long); See Also: ios
ios::flags, Form 1 (member function) ====================================== Declaration: long flags(); Remarks: Returns the current format flags in the data member 'x_flags' of class ios. The format flags can be compared to the values in the formatting flags enumeration of class ios. flags(0) resets the formatting flags as the default value. See Also: ios::flags ios::flags, Form 2
ios::flags, Form 2 (member function) ====================================== Declaration: long flags(long); Remarks: Sets the format flags to be identical to the given long. The flags of the long are set using the values in the formatting flags enumeration in class ios. flags returns the previous flags. flags(0) resets the default format. See Also: ios::flags ios::flags, Form 1
ios::good (member function) ============================= Declaration: int good(); Remarks: Returns nonzero if no state bits were set (no errors occurred) in the data member state of class ios. See Also: ios
ios::init (protected member function) ======================================= Declaration: void init(streambuf *); Remarks: Associates the ios with the specified streambuf. See Also: ios
ios::precision (member functions) ================================== Declarations: Form 1 int precision(int); Form 2 int precision(); See Also: ios
ios::precision, Form 1 (member function) ========================================== Declarations: int precision(int); Remarks: Sets the floating-point precision and returns the previous setting. precision must be reset for each data item being output if you want a precision other than the default. See Also: ios::precision, Form 2 ios::precision
ios::precision, Form 2 (member function) ========================================== Declarations: int precision(); Remarks: Returns the current floating-point precision. See Also: ios::precision, Form 1 ios::precision
ios::rdbuf (member function) ============================== Declaration: streambuf* rdbuf(); Remarks: Returns a pointer to this stream's assigned streambuf. See Also: ios strbuf rdbuf
ios::rdstate (member function) ============================== Declaration: int rdstate(); Remarks: Returns the stream state by returning the value of the data member state of class ios. See Also: ios
ios::setf (member functions) ============================= Declarations: Form 1 long setf(long _setbits, long _field); Form 2 long setf(long); See Also: ios
ios::setf, Form 1 (member function) ===================================== Declarations: long setf(long _setbits, long _field); Remarks: The bits corresponding to those marked in _field are cleared in the data member x_flags, and then reset to be those marked in _setbits. _setbits can be specifed by using the constants in the formatting flags enumeration of class ios. See Also: ios::setf ios::setf, Form 2
ios::setf, Form 2 (member function) ===================================== Declarations: long setf(long); Remarks: Sets the flags corresponding to those marked in the given long. The flags are set in the data member x_flags of class ios. The long can be specified by using the constants in the formatting flags enumeration of class ios. Returns the previous settings. See Also: ios::setf ios::setf, Form 1
ios::setstate (protected member function) =========================================== Declaration: void setstate(int); Remarks: Sets specified status bits. See Also: ios
ios::sync_with_stdio (public member function) =============================================== Declaration: static void sync_with_stdio(); Remarks: Synchronizes stdio files and iostreams (this slows processing down a lot). sync_with_stdio should not be used for new code. See Also: ios
ios::tie (member functions) ============================= Declarations: Form 1 ostream* tie(); Form 2 ostream* tie(ostream*); See Also: ios
ios::tie, Form 1 (member function) ==================================== Declaration: ostream* tie(); Remarks: Returns the tied stream, or 0 if none. Tied streams are those that are connected in such a way that when one is used, the other is affected in some way. For example, cin and cout are tied; when cin is used, it flushes cout first. See Also: ios::tie ios::tie, Form 2
ios::tie, Form 2 (member function) ==================================== Declaration: ostream* tie(ostream*); Remarks: Ties another stream to this one and returns the previously tied stream, if any. When an input stream has characters to be consumed, or if an output stream needs more characters, the tied stream is first flushed automatically. By default, cin, cerr and clog are tied to cout. See Also: ios::tie ios::tie, Form 1
ios::unsetf (member function) =============================== Declaration: long unsetf(long); Remarks: Clears the bits corresponding to those marked in the given long. The bits are cleared in the data member x_flags of class ios. The flags of the long can be set using the constants in the formatting flags enumeration of class ios. unsetf returns the previous settings. See Also: ios
ios::width (member functions) =============================== Declaration: Form 1 int width(); Form 2 int width(int); See Also: ios
ios::width, Form 1 (member function) ====================================== Declaration: int width(); Remarks: Returns the current width setting. See Also: ios::width ios::width, Form 2
ios::width, Form 2 (member function) ====================================== Declaration: int width(int); Remarks: Sets the width as given, and returns the previous width. This must be reset for each data item input or output if a width other than the default is desired. See Also: ios::width ios::width, Form 1
ios::xalloc (member function) =============================== Declaration: static int xalloc(); Remarks: Returns an array index of previously unused words that can be used as user-defined formatting flags. See Also: ios
==================================================== iostream_withassign class summary (IOSTREAM.H) ==================================================== Derived From: iostream Base For: None Remarks: This class is an iostream with two added assignment operators. Both added operators allow you to reassign BP (the pointer to streambuf data member) of base class ios to a different derived class of streambuf. Constructors: iostream_withassign::iostream_withassign(); Member Functions: None (although the = operator is overloaded). See Also: Operators
iostream_withassign::iostream_withassign (constructor) ======================================================== Declaration: iostream_withassign(); Remarks: Null constructor (calls iostream's default constructor). See Also: iostream_withassign
========================================= iostream class summary IOSTREAM.H ========================================= Derived From: istream, ostream Base For: fstream, strstream Remarks: This class is simply a mixture of its base classes, allowing both input and output on a stream. +-----+ +-----------------------------+ | ios |------>|streambuf *bp = strstreambuf*| +-=-=-+ | (ie: &strstreambase::buf) | +---+ +---+ +-----------------------------+ +---+---+ +---+---+ |istream| |ostream| +---=---+ +---=---+ +---+ +---+ +---+-+---+ |iostream | +---------+ The stream is implemented by the class that the ios data member bp is pointing to. Depending on which derived class of streambuf bp is pointing to, iostream determines if the input stream and output stream will be the same. For example, iostream utilizing a filebuf will input and output to the same file. Yet iostream utilizing a strstreambuf can have the input and output stream go to the same or different memory locations. Constructors: iostream::iostream (streambuf *); Member Functions: None
iostream::iostream (constructor) ================================== Declaration: iostream(streambuf *); Remarks: Associates a given streambuf with the class. See Also: iostream
=================================================== istream_withassign class summary (IOSTREAM.H) =================================================== Derived From: istream Base For: None Remarks: This class is an istream with two added assignment operators. Both assignment operators allow you to reassign the pointer to streambuf data member BP of base class ios to a different derived class of streambuf. Constructors: istream_withassign::istream_withassign() Member Functions: None (although the = operator is overloaded) See Also: Operators
istream_withassign::istream_withassign (constructor) ====================================================== Declaration: istream_withassign() Remarks: Null constructor (calls istream's default constructor). See Also: istream_withassign
========================================== istream class summary (IOSTREAM.H) ========================================== Derived From: ios Base For: ifstream iostream istrstream istream_withassign Remarks: Provides formatted and unformatted input from a derived class of class streambuf via data member bp of base class ios. An instance of class istream does not perform the actual input. However, the member functions of class istream call the member functions of the class that bp is pointing to extract the characters from the input stream. The member functions of istream can then format the data. istream provides the generic code for formatting the data after it is extracted from the input stream. The >> operator is overloaded for all fundamental types. Constructors: istream::istream(streambuf *); Member Functions: istream::gcount istream::get istream::getline istream::ignore istream::istream istream::peek istream::putback istream::read istream::seekg istream::tellg See Also: Operator >> Overloading, Classes and Operators
istream::istream (constructor) ================================ Declaration: istream(streambuf *); Remarks: Associates a given derived class of streambuf to the class thus providing an input stream. This is done by assigning the pointer to streambuf data member bp of class ios to the parameter of the constructor. See Also: istream
istream::gcount (member function) =================================== Declaration: int gcount(); Remarks: Returns the number of unformatted characters last extracted. Unformatted extraction occurs within the member functions get, getline, and read. See Also: istream
istream::get (member functions) ================================= Declarations: Form 1 int get(); Form 2 istream& get(signed char*, int len, char = '\n'); Form 3 istream& get(unsigned char*, int len, char = '\n'); Form 4 istream& get(unsigned char&); Form 5 istream& get(signed char&); Form 6 istream& get(streambuf&, char = '\n'); See Also: istream
istream::get, Form 1 (member function) ======================================== Declaration: int get(); Remarks: Extracts the next character or EOF. See Also: istream::get istream::get, Form 2 istream::get, Form 3 istream::get, Form 4 istream::get, Form 5 istream::get, Form 6
istream::get, Form 2 (member function) ======================================== Declaration: istream& get(signed char*, int len, char = '\n'); Remarks: Extracts characters into the given char * until one of the following occurs: * the delimiter (third parameter) is encountered * end-of-file is encountered * (len - 1) bytes have been read A terminating null is always placed in the output string. The delimiter is not extracted from the input stream. Fails only if no characters were extracted. See Also: istream::get istream::get, Form 1 istream::get, Form 3 istream::get, Form 4 istream::get, Form 5 istream::get, Form 6
istream::get, Form 3 (member function) ======================================== Declaration: istream& get(unsigned char*, int len, char = '\n'); Remarks: Extracts characters into the given char * until one of the following occurs: * the delimiter (third parameter) is encountered * end-of-file is encountered * (len - 1) bytes have been read A terminating null is always placed in the output string. The delimiter is not extracted from the input stream. Fails only if no characters were extracted. See Also: istream::get istream::get, Form 1 istream::get, Form 2 istream::get, Form 4 istream::get, Form 5 istream::get, Form 6
istream::get, Form 4 (member function) ======================================== Declaration: istream& get(unsigned char&); Remarks: Extracts a single character into the given character reference. See Also: istream::get istream::get, Form 1 istream::get, Form 2 istream::get, Form 3 istream::get, Form 5 istream::get, Form 6
istream::get, Form 5 (member function) ======================================== Declaration: istream& get(signed char&); Remarks: Extracts a single character into the given character reference. See Also: istream::get istream::get, Form 1 istream::get, Form 2 istream::get, Form 3 istream::get, Form 4 istream::get, Form 6
istream::get, Form 6 (member function) ======================================== Declaration: istream& get(streambuf&, char = '\n'); Remarks: Extracts characters into the given streambuf until the delimiter is encountered. See Also: istream::get istream::get, Form 1 istream::get, Form 2 istream::get, Form 3 istream::get, Form 4 istream::get, Form 5
istream::getline (member functions) ===================================== Declarations: Form 1 istream& getline(signed char*, int, char = '\n'); Form 2 istream& getline(unsigned char*, int, char = '\n'); See Also: istream
istream::getline, Form 1 (member function) ============================================ Declaration: istream& getline(signed char*, int, char = '\n'); Remarks: This form of getline does the following: * extracts up to the delimiter, * puts the characters in the buffer * removes the delimiter from the input stream * does not put the delimiter into the buffer See Also: istream::getline istream::getline, Form 2
istream::getline, Form 2 (member function) ============================================ Declaration: istream& getline(unsigned char*, int, char = '\n'); Remarks: Same as istream::get (Form 3), except the delimiter is also extracted. The delimiter is not placed into the destination string. See Also: istream::getline istream::getline, Form 1
istream::ignore (member function) =================================== Declaration: istream& ignore(int n = 1, int delim = EOF); Remarks: Causes up to n characters in the input stream to be skipped; stops if delim is encountered. The delimiter is extracted from the stream. See Also: istream
istream::peek (member function) ================================= Declaration: int peek(); Remarks: Returns next char without extraction. See Also: istream
istream::putback (member function) ==================================== Declaration: istream& putback(char); Remarks: Pushes back a character into the stream. See Also: istream
istream::read (member functions) ================================== Declarations: Form 1 istream& read(signed char*, int); Form 2 istream& read(unsigned char*, int); See Also: istream
istream::read, Form 1 (member function) ========================================= Declaration: istream& read(signed char*, int); Remarks: Extracts a given number of characters into an array. Use gcount() for the number of characters actually extracted if an error occurred. See Also: istream::read istream::read, Form 2
istream::read, Form 2 (member function) ========================================= Declaration: istream& read(unsigned char*, int); Remarks: Extracts a given number of characters into an array. Use gcount() for the number of characters actually extracted if an error occurred. See Also: istream::read istream::read, Form 1
istream::seekg (member functions) =================================== Declarations: Form 1 istream& seekg(long); Form 2 istream& seekg(long, seek_dir); See Also: istream
istream::seekg, Form 1 (member function) ========================================== Declaration: istream& seekg(long); Remarks: Moves to an absolute position (as returned from tellg). See Also: istream::seekg istream::seekg, Form 2
istream::seekg, Form 2 (member function) ========================================== Declaration: istream& seekg(long); Remarks: Moves to a position relative to the current position, following this definition: enum seek_dir { beg, cur, end }; See Also: istream::seekg istream::seekg, Form 1
istream::tellg (member function) ================================== Declaration: long tellg(); Remarks: Returns the current stream position. See Also: istream
=================================================== ostream_withassign class summary (IOSTREAM.H) =================================================== Derived From: ostream Base For: None Remarks: This class is an ostream with two added assignment operators. Both assignment operators allow you to reassign the pointer to streambuf data member bp of base class ios to a different derived class of streambuf. Constructors: ostream_withassign::ostream_withassign() Member Functions: None (although the = operator is overloaded) See Also: Operators
ostream_withassign::ostream_withassign (constructor) ====================================================== Declaration: ostream_withassign() Remarks: Null constructor (calls ostream's default constructor). See Also: ostream_withassign
========================================== ostream class summary (IOSTREAM.H) ========================================== Derived From: ios Base For: iostream ofstream ostrstream ostream_withassign Remarks: Provides formatted and unformatted output to a derived class of class streambuf. This occurs via data member bp of base class ios. An instance of class ostream will not perform the actual output. However, the member functions of ostream will call the member functions of the class that bp is pointing to insert the characters to the output stream. The member functions of ostream format the data before it is sent to bp. ostream provides the generic code for formatting the data before it is inserted to the output stream. Constructors: ostream::ostream(streambuf *); Member Functions: ostream::flush ostream::ostream ostream::put ostream::seekp ostream::tellp ostream::write See Also: Overloading, Classes and Operators
ostream::ostream (constructor) ================================ Declaration: ostream(streambuf *); Remarks: Associates a given derived class of streambuf to the class, providing an output stream. This is done by assigning the pointer to streambuf data member bp of class ios to the parameter of the constructor. See Also: ostream
ostream::flush (member function) ================================== Declaration: ostream& flush(); Remarks: Flushes the stream. See Also: ostream
ostream::seekp (member functions) =================================== Declarations: Form 1 ostream& seekp(long); Form 2 ostream& seekp(long, seek_dir); See Also: ostream
ostream::seekp, Form 1 (member function) ========================================== Declaration: ostream& seekp(long); Remarks: Moves to an absolute position (as returned from tellp). See Also: ostream::seekp ostream::seekp, Form 2
ostream::seekp, Form 2 (member function) ========================================== Declaration: ostream& seekp(long, seek_dir); Remarks: Moves to a position relative to the current position, following this definition: enum seek_dir { beg, cur, end }; See Also: ostream::seekp ostream::seekp, Form 1
ostream::put (member function) ================================ Declaration: ostream& put(char); Remarks: Inserts the character. See Also: ostream
ostream::tellp (member function) ================================== Declaration: long tellp(); Remarks: Returns the current stream position. See Also: ostream
ostream::write (member functions) ================================== Declarations: Form 1 ostream& write(const signed char*, int n); Form 2 ostream& write(const unsigned char*, int n); See Also: ostream
ostream::write, Form 1 (member function) ========================================== Declaration: ostream& write(const signed char*, int n); Remarks: Inserts n characters (nulls included). See Also: ostream ostream::write, Form 2
ostream::write, Form 2 (member function) ========================================== Declaration: ostream& write(const unsigned char*, int n); Remarks: Inserts n characters (nulls included). See Also: ostream ostream::write, Form 1
============================================= streambuf class summary (IOSTREAM.H) ============================================= Derived From: None Base For: filebuf, strstreambuf Remarks: This is a buffer-handling class. Your applications gain access to buffers and buffering functions through a pointer to streambuf that is set by ios. Constructors: streambuf::streambuf(); streambuf::streambuf(char *, int); Member Functions: streambuf::allocate streambuf::base streambuf::blen streambuf::doallocate streambuf::do_sgetn streambuf::eback streambuf::ebuf streambuf::egptr streambuf::epptr streambuf::gbump streambuf::gptr streambuf::in_avail streambuf::out_waiting streambuf::overflow streambuf::pbackfail streambuf::pbase streambuf::pbump streambuf::pptr streambuf::sbumpc streambuf::seekoff streambuf::seekpos streambuf::setb streambuf::setg streambuf::setp streambuf::sgetc streambuf::sgetn streambuf::setbuf streambuf::snextc streambuf::so_sputn streambuf::sputbackc streambuf::sputc streambuf::sputn streambuf::stossc streambuf::streambuf streambuf::sync streambuf::unbuffered streambuf::underflow See Also: Derived classes of streambuf
Derived classes of streambuf ============================== The derived classes of streambuf are data members to some of the base classes within the C++ Stream Library (ios, strstreambase, fstreambase). Although streambuf provides the internal memory buffer used when inserting or extracting characters from a stream, the input and output streams are provided for by its derived classes. The member functions of streambuf manipulate its internal buffer. When the virtual member functions are redefined in a derived class, they can be used to maintain that class's stream.
streambuf::streambuf (constructors) ===================================== Declarations: Form 1 streambuf(); Form 2 streambuf(char *, int); See Also: streambuf
streambuf::streambuf, Form 1 (constructor) ============================================ Declaration: streambuf(); Remarks: Creates an empty buffer object. See Also: streambuf::streambuf, Form 2 streambuf::streambuf
streambuf::streambuf, Form 2 (constructor) ============================================ Declaration: streambuf(char *, int); Remarks: Uses the given array and size as the internal buffer. See Also: streambuf::streambuf, Form 1 streambuf::streambuf
streambuf::allocate (protected member function) ================================================= Declaration: int allocate(); Remarks: Sets up a buffer area. See Also: streambuf
streambuf::doallocate (member function) ========================================= Declaration: int doallocate(); Remarks: Allocates an internal buffer for the streambuf. See Also: streambuf
streambuf::do_sgetn (member function) ======================================= Declaration: int do_sgetn(char *, int); Remarks: Gets the indicated number of characters, copying them into the indicated memory area. Returns the actual number of characters transferred. See Also: streambuf
streambuf::base (protected member function) ============================================= Declaration: char *base(); Remarks: Returns the start of the buffer area. See Also: streambuf
streambuf::blen (protected member function) ============================================= Declaration: int blen(); Remarks: Returns the length of the buffer area. See Also: streambuf
streambuf::eback (protected member function) ============================================== Declaration: char *eback(); Remarks: Returns the base of the putback section of the get area. See Also: streambuf
streambuf::ebuf (protected member function) ============================================= Declaration: char *ebuf(); Remarks: Returns the end+1 of the buffer area. See Also: streambuf
streambuf::egptr (protected member function) ============================================== Declaration: char *egptr(); Remarks: Returns the end+1 of the get area. See Also: streambuf
streambuf::epptr (protected member function) ============================================== Declaration: char *epptr(); Remarks: Returns the end+1 of the put area. See Also: streambuf
streambuf::gbump (protected member function) ============================================== Declaration: void gbump(int); Remarks: Advances the get pointer by n (which can be positive or negative). No checks are performed on the new value. See Also: streambuf
streambuf::gptr (protected member function) ============================================= Declaration: char *gptr(); Remarks: Returns the next location in the get area. See Also: streambuf
streambuf::in_avail (member function) ======================================= Declaration: int in_avail(); Remarks: Returns the number of characters remaining in the internal input buffer. This might be the input stream, depending on which derived class of streambuf the function call originated from. See Also: streambuf
streambuf::out_waiting (member function) ========================================== Declaration: int out_waiting(); Remarks: Returns the number of characters remaining in the internal output buffer. This might be the output stream, depending on which derived class of streambuf the function call originated from. See Also: streambuf
streambuf::overflow (member function) ======================================= Declaration: int overflow(int = EOF); Remarks: Called when the output buffer is full and another character is to be written. Flushes the buffer to the physical device and reinitializes the empty buffer. See Also: streambuf
streambuf::pbackfail (member function) ======================================= Declaration: int pbackfail(int); Remarks: Puts a character back into the streambuf. See Also: streambuf
streambuf::pbase (protected member function) ============================================== Declaration: char *pbase(); Remarks: Returns the start of the put area. See Also: streambuf
streambuf::pbump (member function) ==================================== Declaration: void pbump(int); Remarks: Increments pptr() by n (which can be positive or negative). No checks are performed on the new value of pptr(). See Also: streambuf
streambuf::pptr (protected member function) ============================================= Declaration: char *pptr(); Remarks: Returns a pointer to the next location in the put area. See Also: streambuf
streambuf::sbumpc (member function) ===================================== Declaration: int sbumpc(); Remarks: Returns the current character from the internal input buffer. This might be the input stream, depending on which derived class of streambuf the function call originated from. See Also: streambuf
streambuf::seekoff (member function) ====================================== Declaration: virtual streampos seekoff(streamoff, ios::seek_dir, int = (ios::in | ios::out)); Remarks: Moves the get or put pointer relative to the current position in the direction of seek_dir. The third argument determines whether the get, put, or both pointers move. The int specifies the move to be in the get or put area of the internal buffer. seek_dir can be set using the constants in the ios seek_dir enumeration. The int can be set using the constants ios::in or ios::out. When this virtual member function is redefined in a derived class, it could be seeking into the stream and not into streambuf's internal buffer. See Also: streambuf
streambuf::seekpos (member function) ====================================== Declaration: virtual streampos seekpos(streampos, int = (ios::in | ios::out)); Remarks: Moves the get and/or put pointer to an absolute position in streambuf's internal buffer. Because seekpos is virtual, it may be redefined in a derived class to reposition in the input and/or output stream. See Also: streambuf
setb (protected member function) ================================== Declaration: void setb(char *, char *, int = 0); Remarks: Sets the buffer area. See Also: streambuf
setg (protected member function) ================================== Declaration: void setg(char *, char *, char *); Remarks: Initializes the get pointers. See Also: streambuf
setp (protected member function) ================================== Declaration: void setp(char *, char *); Remarks: Initializes the put pointers. See Also: streambuf
streambuf::sgetc (member function) ==================================== Declaration: int sgetc(); Remarks: Peeks at the next character in the internal input buffer. See Also: streambuf
streambuf::sgetn (member function) ==================================== Declaration: int sgetn(char*, int n); Remarks: Gets the next n characters from the internal input buffer. See Also: streambuf
streambuf::setbuf (member function) ===================================== Declaration: * virtual streambuf* setbuf(signed char*, int); * streambuf* setbuf(unsigned char*, int); Remarks: Uses the specified array for the internal buffer. See Also: streambuf
streambuf::snextc (member function) ===================================== Declaration: int snextc(); Remarks: Advances to and returns the next character from the internal input buffer. See Also: streambuf
streambuf::so_sputn (member function) ======================================= Declaration: int so_sputn(const char*, int); Remarks: Writes specified characters to the streambuf. The second argument is the maximum number of characters to write. Returns the number of characters written. See Also: streambuf
streambuf::sputbackc (member function) ======================================== Declaration: int sputbackc(char); Remarks: Returns a character to the internal input buffer. See Also: streambuf
streambuf::sputc (member function) ==================================== Declaration: int sputc(int); Remarks: Puts one character into the internal output buffer. See Also: streambuf
streambuf::sputn (member function) ==================================== Declaration: int sputn(const char*, int n); Remarks: Puts n characters into the internal output buffer. See Also: streambuf
streambuf::stossc (member function) ===================================== Declaration: void stossc(); Remarks: Advances to the next character in the internal input buffer. See Also: streambuf
streambuf::sync (member function) =================================== Declaration: int sync(); Remarks: Synchronizes the internal buffer with the physical device. See Also: streambuf
streambuf::unbuffered (protected member functions) ==================================================== Declaration: void unbuffered(int); int unbuffered(); Remarks: The first form sets the buffering state. The second form returns non-zero if not buffered. See Also: streambuf
streambuf::underflow (member function) ======================================== Declaration: int underflow(); Remarks: Called when input is requested and the internal buffer is empty. Will ordinarily read more characters from the input device. See Also: streambuf