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 to std::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 function eoi_ 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) β€” The eoi manipulator can be inserted into the ostream using a streambuf which is inherited from FBB::EoiBuf to stop further insertions into the ostream. If it is inserted into a plain std::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:

  1. define a bool d_eoi data member, initialized to false;
  2. define a void eoi_() override member;
  3. eoi_ returns if d_eoi == true, otherwise:
  4. it sets d_eoi to true and performs the actions normally performed by the class's destructor;
  5. 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 πŸ’–

bobcat(7), eoibuf(3bobcat)


πŸ’€ BUGS πŸ’€

None Reported. (a rare and blessed moment ✨)


πŸŽ€ BOBCAT PROJECT FILES πŸŽ€

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)


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