FBB::IOStream(3bobcat)

πŸ’– FBB::IOStream β€” bestie edition πŸ’–

okay so this is FBB::IOStream(3bobcat), and the whole ~vibe~ is "std::istream and std::ostream, but make it one girl." She's a combo class, she's the moment, and she comes to you straight from the bobcat manual. Let's get into it 🫢


✨ NAME ✨

FBB::IOStream β€” the class that literally just combines std::istream and std::ostream features into one iconic being. That's it. That's the name. Slay. πŸ‘‘


🌈 SYNOPSIS 🌈

#include <bobcat/iostream>

Linking option: -lbobcat


πŸ¦‹ DESCRIPTION πŸ¦‹

So this class combines the features of the std::istream and std::ostream classes, and the plot twist is that the std::istream and std::ostream may be physically different streams. Not a typo, not a glitch β€” that's the whole point, bestie. ✨

FBB:IOStream objects may, like, be associated with streams wrapped around pipes (think FBB::IfdStream and FBB::OFdStream), which is literally how you construct bi-directional pipes. Main character behavior only πŸ’…


πŸŽ€ NAMESPACE πŸŽ€

FBB

All constructors, members, operators and manipulators mentioned in this man-page are defined in the namespace FBB. No strays, no exceptions, all accounted for 🧚


πŸ‘‘ INHERITS FROM πŸ‘‘

  • FBB::IOBuf (private inheritance)
  • std::istream
  • std::ostream

🌸 CONSTRUCTORS 🌸

  • IOStream() β€” the default constructor. It constructs an empty FBB::IOStream object. ⚠️ Do not use it before its open member (see below) has been called, fr fr. It's giving "empty until activated."
  • IOStream(std::istream &in, std::ostream &out) β€” this constructor associates the IOStream object with a std::istream and a std::ostream. Every output operation gets passed on to the std::ostream, every input operation goes to the std::istream. The streams passed to IOStream should outlive the IOStream object. 😭 This constructor performs the actions of the default constructor and then calls the IOStream::open member.
Copy and move constructors (and assignment operators) are not available. Not on the menu. Do not ask. 🚫

πŸ’… MEMBER FUNCTIONS πŸ’…

All members of std::istream and std::ostream are available, because FBB::IOStream inherits from these classes. Periodt.

And here's the cute part: when switching between std::istream and std::ostream operations, no intermediate seekg() or seekp() operation will normally be required, since the base classes will normally be associated with physically different streams. No extra steps, no drama, we love a seamless transition πŸ”₯

  • void open(std::istream &in, std::ostream &out) β€” this member (re)associates the IOStream 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 IOStream() should outlive the IOStream object. 🫢 And heads up: if this member is called for an IOStream object that's already associated with an std::ostream object, the already associated std::ostream object is flushed before setting up the new association. Clean exit, no leftovers ✨
  • void clear() β€” this member clears the error states of the associated std::istream and std::ostream objects. Emotional reset button, honestly 🌸

⭐ EXAMPLE ⭐

See the example provided with process(3bobcat). (Yes, it's a whole cross-reference moment, go look πŸ‘€)


πŸ“ FILES πŸ“

  • bobcat/iostream β€” defines the class interface

🌈 SEE ALSO 🌈

bobcat(7), ifdstream(3bobcat), iobuf(3bobcat), ofdstream(3bobcat), process(3bobcat)


πŸ’€ BUGS πŸ’€

None Reported. (Not me being shocked β€” she's literally perfect, no notes πŸ™ˆ)


πŸŽ€ 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’. (iykyk 😌)


This is free software, distributed under the terms of the GNU General Public License (GPL). Free as in "go off, bestie" ✨


🌸 AUTHOR 🌸

Frank B. Brokken (f.b.brokken@rug.nl). Legend behavior, honestly πŸ‘‘



okay that's the whole page, bestie!! this is the FBB::IOStream(3bobcat) page from libbobcat-dev_6.15.01, dated 2005-2026 β€” shoutout to the bobcat era from 2005 all the way through 2026, a true long-running queen πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from