FBB::Eoi(3bobcat)
End-Of-Information Base class
(libbobcat-dev_5.02.00-x.tar.gz)
2005-2019
NAME
FBB::Eoi - std::streambuf class offering an eoi manipulator
SYNOPSIS
#include <bobcat/eoi>
Linking option: -lbobcat
DESCRIPTION
The class Eoi inherits from std::streambuf and may therefore be
used as a base class of classes specializing std::streambuf. It is
particularly useful for classes implementing output operations, as it can be
used to specify the `true end' of the generated output. E.g., an
std::istream in object may insert its contents into a std::ostream out
object using the familiar out << in.rdbuf() expression, but that doesn't
allow out to conclude that it has received all of its information.
Sometimes additional actions are required to complete the output (this happens
with, e.g., EncryptBuf objects (cf. encryptbuf(3bobcat)) where after
encrypting all input padding characters may have to be added to the encrypted
document). If out is initialized with the address of an EncryptBuf
std::streambuf then the true end of the input can be indicated by inserting
the eoi manipulator. The resulting expression becomes std::cout <<
in.rdbuf() << eoi, and the manipulator ensures that the correct padding is
handled.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace FBB.
INHERITS FROM
std::streambuf
PROTECTED CONSTRUCTOR
- Eoi():
Analogously to std::streambuf only a default protected constructor
is available.
Copy and move constructors (and assignment operators) are not available.
MEMBER FUNCTIONS
All members of std:streambuf are available, as FBB::Eoi inherits
from these classes.
VIRTUAL MEMBER FUNCTION
- virtual void eoi_():
The virtual member function eoi_ is a private member that can be
overridden by derived classes. By default it performs no actions.
MANIPULATORS
- std::ostream &FBB::eoi(std::ostream &out):
If the ostream out's streambuf's address can be downcasted to an
Eoi * then its eoi_ member is called. Otherwise the
manipulator performs no actions, and merely returns out.
EXAMPLE
See the example provided in the encryptbuf(3bobcat) man-page
FILES
bobcat/eoi - defines the class interface
SEE ALSO
bobcat(7), eoibuf(3bobcat)
BUGS
None Reported.
DISTRIBUTION FILES
- bobcat_5.02.00-x.dsc: detached signature;
- bobcat_5.02.00-x.tar.gz: source archive;
- bobcat_5.02.00-x_i386.changes: change log;
- libbobcat1_5.02.00-x_*.deb: debian package holding the
libraries;
- libbobcat1-dev_5.02.00-x_*.deb: debian package holding the
libraries, headers and manual pages;
- 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).