Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
FBB::IOStreambuf(3bobcat)     Streambuf	doing I/O    FBB::IOStreambuf(3bobcat)

NAME
       FBB::IOStreambuf	- streambuf allowing input and output operations

SYNOPSIS
       #include	<bobcat/iostreambuf>
       Linking option: -lbobcat

DESCRIPTION
       This class implements a specialization of the std::streambuf class, al-
       lowing input operations from and	output operations to different	files.
       It  is  intended	to be used in combination with FBB::IOStream, thus al-
       lowing all stream-based input and output	operations using the same  ob-
       ject  without  the  need	to use seek-operations.	Using an FBB::IOStream
       object it is, e.g., possible to construct two-way communications	 using
       pipes, much like	the facilities offered by sockets.

       If the streams that will	be associated with the IOStreambuf object sup-
       port seeking, then the IOStreambuf will do so to. Seeking might also be
       availble	 for  a	single stream (either the std::istream or the std::os-
       tream).

       When the	IOStreambuf object goes	out of scope, its associated  std::os-
       tream object is flushed.

NAMESPACE
       FBB
       All  constructors,  members,  operators	and manipulators, mentioned in
       this man-page, are defined in the namespace FBB.

INHERITS FROM
       std::streambuf

CONSTRUCTORS
       o      IOStreambuf():
	      The default constructor results in  a  IOStreambuf  object  that
	      cannot  be  immediately  used.  Its member open()	must be	called
	      first.

       o      IOStreambuf(std::istream &in, std::ostream &out):
	      This  constructor	 associates  the  IOStreambuf  object  with  a
	      std::istream  and	 a std::ostream. All output operations will be
	      passed on	to the	std::ostream,  all  input  operations  to  the
	      std::istream. The	streams	passed to IOStreambuf()	should outlive
	      the IOStreambuf object.	Copy  and  move	 constructors  is  not
	      available.

MEMBER FUNCTIONS
       All members of std::streambuf are available, as FBB::IOStreambuf	inher-
       its from	these classes.

       o      void open(std::istream &in, std::ostream &out):
	      This  member  (re)associates  the	 IOStreambuf  object  with   a
	      std::istream  and	 a std::ostream. All output operations will be
	      passed on	to the	std::ostream,  all  input  operations  to  the
	      std::istream. The	streams	passed to IOStreambuf()	should outlive
	      the  IOStreambuf	object.	 If  this  member  is  called  for  an
	      IOStreambuf  object  already associated with an std::ostream ob-
	      ject, the	already	associated std::ostream	object is flushed  be-
	      fore setting up the new association.

VIRTUAL	PROTECTED MEMBER FUNCTIONS
       The  following  std::streambuf  member  functions should	only be	called
       when the	FBB::Streambuf object  is  associated  with  std::istream  and
       std::ostream  objects (i.e., they should	not be called between the con-
       struction of a default FBB:IOStreambuf object and a subsequent call  of
       IOStreambuf::open()):

       The  members  listed  in	this section implement the tasks of comparably
       named virtual function in the class's private interface.	This separates
       the  redefinable	interface from the user-interface. The class IOStream-
       Buf can,	in accordance with Liskov's Substitution Principle, be used as
       a  std:streambuf;  but  it  also	offers facilities for classes deriving
       from IOStreamBuf. These facilities are listed here.

       o      pos_type	pSeekoff(off_type   offset,   std::ios::seekdir	  way,
	      std::ios::openmode mode =	std::ios::in | std::ios::out):
	      With  seekable  streams, repositions the associated std::istream
	      or std::ostream is repositioned to offset	 offset,  relative  to
	      way.

       o      pos_type	pSeekpos(off_type  offset,  std::ios::openmode	mode =
	      std::ios::in | std::ios::out):
	      With seekable streams, repositions the  associated  std::istream
	      or  std::ostream	is  repositioned to offset offset, relative to
	      the beginning of the stream.

       o      int pSync():
	      This member flushes the associated std::ostream object.

       o      std::streamsize pXsputn(char const *buffer, std::streamsize n):
	      This member inserts n characters from buffer into	the associated
	      std::ostream stream.

EXAMPLE
       See the example provided	with process(3bobcat).

FILES
       bobcat/iostreambuf - defines the	class interface

SEE ALSO
       bobcat(7), iostream(3bobcat), process(3bobcat)

BUGS
       None reported.

DISTRIBUTION FILES
       o      bobcat_3.25.01-x.dsc: detached signature;

       o      bobcat_3.25.01-x.tar.gz: source archive;

       o      bobcat_3.25.01-x_i386.changes: change log;

       o      libbobcat1_3.25.01-x_*.deb:   debian  package  holding  the  li-
	      braries;

       o      libbobcat1-dev_3.25.01-x_*.deb: debian package holding  the  li-
	      braries, headers and manual pages;

       o      http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT
       Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT
       This  is	 free software,	distributed under the terms of the GNU General
       Public License (GPL).

AUTHOR
       Frank B.	Brokken	(f.b.brokken@rug.nl).

libbobcat-dev_3.25.01-x.tar.gz	   2005-2015	     FBB::IOStreambuf(3bobcat)

NAME | SYNOPSIS | DESCRIPTION | NAMESPACE | INHERITS FROM | CONSTRUCTORS | MEMBER FUNCTIONS | VIRTUAL PROTECTED MEMBER FUNCTIONS | EXAMPLE | FILES | SEE ALSO | BUGS | DISTRIBUTION FILES | BOBCAT | COPYRIGHT | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=iostreambuf&sektion=3bobcat&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help