.TH "FBB::Eoi" "3bobcat" "2005\-2023" "libbobcat\-dev_6\&.04\&.00" "End\-Of\-Information Base class" .PP .SH "NAME" FBB::Eoi \- std::streambuf class offering an eoi manipulator .PP .SH "SYNOPSIS" \fB#include \fP .br Linking option: \fI\-lbobcat\fP .PP .SH "DESCRIPTION" The class \fIEoi\fP inherits from \fIstd::streambuf\fP and may therefore be used as a base class of classes specializing \fIstd::streambuf\fP\&. It is particularly useful for classes implementing output operations, as it can be used to specify the `true end\(cq\& of the generated output\&. E\&.g\&., an \fIstd::istream in\fP object may insert its content into a \fIstd::ostream out\fP object using the familiar \fIout << in\&.rdbuf()\fP expression, but that doesn\(cq\&t allow \fIout\fP to conclude that it has received all of its information\&. Sometimes additional actions are required to complete the output (this happens with, e\&.g\&., \fIEncryptBuf\fP objects (cf\&. \fBencryptbuf\fP(3bobcat)) where after encrypting all input padding characters may have to be added to the encrypted document)\&. If \fIout\fP is initialized with the address of an \fIEncryptBuf std::streambuf\fP then the true end of the input can be indicated by inserting the \fIeoi\fP manipulator\&. The resulting expression becomes \fIstd::cout << in\&.rdbuf() << eoi\fP, and the manipulator ensures that the correct padding is handled\&. .PP .SH "NAMESPACE" \fBFBB\fP .br All constructors, members, operators and manipulators, mentioned in this man\-page, are defined in the namespace \fBFBB\fP\&. .PP .SH "INHERITS FROM" \fIstd::streambuf\fP .PP .SH "PROTECTED CONSTRUCTOR" .IP o \fBEoi()\fP: .br Analogously to \fIstd::streambuf\fP only a default protected constructor is available\&. .PP Copy and move constructors (and assignment operators) are not available\&. .PP .SH "MEMBER FUNCTIONS" All members of \fIstd:streambuf\fP are available, as \fBFBB::Eoi\fP inherits from these classes\&. .PP .SH "VIRTUAL MEMBER FUNCTION" .PP .IP o \fBvirtual void eoi_()\fP: .br The virtual member function \fIeoi_\fP is a private member that can be overridden by derived classes\&. By default it performs no actions\&. .PP .SH "MANIPULATOR" .IP o \fBstd::ostream &FBB::eoi(std::ostream &out)\fP: .br The \fIeoi\fP manipulator can be inserted into the \fIostream\fP using a streambuf which is inherited from \fIFBB::EoiBuf\fP to stop further insertions into the \fIostream\fP\&. If it is inserted into a plain \fIstd::ostream\fP nothing happens\&. .IP \fIeoi\fP can also be called as a function, receiving the stream that uses an \fIFBB::EoiBuf\fP as its \fIstreambuf\fP\&. By default the \fIeoi\fP manipulator performs no actions\&. To use the manipulator in a class derived from \fIEoiBuf\fP the following approach can be used: .nf 1\&. define a tt(bool d_eoi) data member, initialized to tt(false); 2\&. define a tt(void eoi_() override) member; 3\&. tt(eoi_) returns if tt(d_eoi == true), otherwise: 4\&. it sets tt(d_eoi) to tt(true) and performs the actions normally performed by the class\(cq\&s destructor; 5\&. the class\(cq\&s destructor calls tt(eoi_())\&. .fi .PP .SH "EXAMPLE" See the example provided in the \fIosymcryptstream\fP(3bobcat) man\-page .PP .SH "FILES" \fIbobcat/eoi\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7), \fBeoibuf\fP(3bobcat) .PP .SH "BUGS" None Reported\&. .PP .SH "BOBCAT PROJECT FILES" .PP .IP o \fIhttps://fbb\-git\&.gitlab\&.io/bobcat/\fP: gitlab project page; .IP o \fIbobcat_6\&.04\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_6\&.04\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_6\&.04\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_6\&.04\&.00\-x_*\&.deb\fP: debian package containing the libraries; .IP o \fIlibbobcat1\-dev_6\&.04\&.00\-x_*\&.deb\fP: debian package containing the libraries, headers and manual pages; .PP .SH "BOBCAT" Bobcat is an acronym of `Brokken\(cq\&s Own Base Classes And Templates\(cq\&\&. .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the GNU General Public License (GPL)\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&. .PP