FBB::Eoi(3bobcat)
π FBB::Eoi π
okay so hi bestie πΈ this is the manual page for FBB::Eoi, from the bobcat man pages (that's section 3bobcat for you keeping score at home), and it's literally the End-Of-Information Base class. yes that's the whole vibe. it's giving "the last chapter, the final boss, the periodt at the end of the sentence" β¨
β¨ NAME β¨
FBB::Eoi β a std::streambuf class offering an eoi manipulator π
π SYNOPSIS π
#include <bobcat/eoi>
Linking option: -lbobcat
π¦ DESCRIPTION π¦
So the class Eoi inherits from std::streambuf, which means it can absolutely be used as a base class for classes that specialize std::streambuf. like, that's its whole thing. π
It's especially useful for classes that implement output operations, because it lets you specify the <italic>true end</italic> of the generated output. Which β hear me out β is a bigger deal than it sounds.
Picture this: an std::istream in object wants to insert its content into a std::ostream out object using the familiar expression:
out << in.rdbuf()
Cute! Love that for them. But (and this is the plot twist π) that doesn't let out figure out that it has received all of its information. Sometimes extra actions are required to complete the output. This happens with, like, EncryptBuf objects (cf. encryptbuf(3bobcat)) where after encrypting all the input, padding characters may have to be added to the encrypted document. classic padding moment.
So 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 makes sure the correct padding gets handled. no cap. π₯
π NAMESPACE π
FBB
All constructors, members, operators and manipulators mentioned in this man-page are defined in the namespace FBB. periodt.
π INHERITS FROM π
std::streambuf
π«Ά PROTECTED CONSTRUCTOR π«Ά
Eoi()β Analogously tostd::streambuf, only a default protected constructor is available. that's it, that's the only one, no plus-ones allowed π
Copy and move constructors (and assignment operators) are not available. not invited to the party, bestie.
π MEMBER FUNCTIONS π
All members of std:streambuf are available, since FBB::Eoi inherits from these classes. everything, all of it, the whole inheritance buffet π
β VIRTUAL MEMBER FUNCTION β
virtual void eoi_()β The virtual member functioneoi_is a private member that can be overridden by derived classes. By default it performs no actions. like, zero. nothing. silent. (iykyk that's a feature, not a bug π )
π MANIPULATOR π
std::ostream &FBB::eoi(std::ostream &out)β Theeoimanipulator can be inserted into the ostream using astreambufwhich is inherited fromFBB::EoiBufto stop further insertions into the ostream. If it is inserted into a plainstd::ostream, nothing happens. (yes, seriously, it just vibes and does nothing πΈ)
eoi can also be called as a function, receiving the stream that uses an FBB::EoiBuf as its streambuf. By default the eoi manipulator performs no actions.
To use the manipulator in a class derived from EoiBuf the following approach can be used:
- define a
bool d_eoidata member, initialized tofalse; - define a
void eoi_() overridemember; eoi_returns ifd_eoi == true, otherwise:- it sets
d_eoitotrueand performs the actions normally performed by the class's destructor; - the class's destructor calls
eoi_().
the way that's literally just "do the destructor stuff but on purpose, when I say so" π iconic.
π EXAMPLE π
See the example provided in the osymcryptstream(3bobcat) man-page. go read that one, it's a whole crossover episode π¦
π§ FILES π§
bobcat/eoi β defines the class interface
π SEE ALSO π
π BUGS π
None Reported. (a rare and blessed moment β¨)
π BOBCAT PROJECT FILES π
https://fbb-git.gitlab.io/bobcat/: gitlab project page;
Debian Bobcat project files:
libbobcat6: debian package containing the shared library, changelog and copyright note;libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;
π BOBCAT π
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. π«Ά (yes the apostrophe situation in the original is exactly like that, I don't make the rules)
π 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).
okay bestie that's the whole page and you absolutely ate it π
one last lil sign-off: this manual page belongs to libbobcat-dev_6.15.01, dated 2005-2026, and it's the FBB::Eoi(3bobcat) page, forever and always πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms