FBB::lm(3bobcat)

πŸ’« NAME πŸ’«

FBB::lm β€” a manipulator that sets the left margin of OFoldStream objects, bestie. That's the whole gig. πŸŽ€

Quick vibe check before we dive: this page lives in the 3bobcat manual, and the library it's from is bobcat. Now let's get into it.


✨ SYNOPSIS ✨

#include <bobcat/ofoldstream> or
#include <bobcat/ofoldbuf>
Linking option: -lbobcat

🌸 DESCRIPTION 🌸

Okay so the lm class is literally a manipulator you insert into OFoldStream objects to set that stream's left margin to whatever value you want. Iconic behavior honestly.

Depending on how the OFoldStream has its tabs set, the value you insert means the number of blank space characters used for the left margin, or the number of tab characters used for the left margin. So same number, two different meanings β€” depends on the tab setting, iykyk. πŸ‘‘

Here's the thing though, because timing is everything: your request doesn't happen instantly. It gets processed at the next newline character, or the next std::flush or std::endl manipulator that you insert into the stream. And if a line is still going once an lm object and a flush manipulator have been inserted into the stream, then the new left margin becomes effective at the next word inserted into that line. Peep the example section below for the visuals. πŸ”₯

🚨 Warning bestie: a bad_cast exception gets thrown if you insert this manipulator into an ostream that is not using an OFoldBuf buffer. So don't do that. It will not slay, it will crash.

πŸ¦‹ NAMESPACE πŸ¦‹

FBB

Every constructor, member, operator and manipulator mentioned in this man-page is defined in the namespace FBB. All of them. No stragglers. πŸ’…


πŸ’œ INHERITS FROM πŸ’œ

-

Nope. Nothing. It inherits from nothing, it's self-made, it's independent, it's giving main character energy.


πŸŽ€ CONSTRUCTOR πŸŽ€

  • lm(size_t newValue) β€” constructs it with the new margin value you're requesting.

Also, copy and move constructors (and assignment operators) are available. So you can copy it, move it, assign it. Versatile queen. ✨


🌈 MEMBER FUNCTIONS 🌈

  • std::ostream &modify(std::ostream &out) const β€” this member is normally not called directly from your programs, so hands off unless you know exactly what you're doing. Instead, the insertion operator calls it for you when you insert the lm manipulator. Let the machinery do its thing, bestie. 🫢

πŸ“ EXAMPLE πŸ“

#include <iostream>
#include <bobcat/ofoldstream>

using namespace std;
using namespace FBB;

int main()
{
    OFoldStream out(cout, 0, 80);
    out << "hello world (left margin is 0)" << lm(4) << "\n"
           "this uses a 4 character wide left margin\n" <<
           lm(0) << flush << "at column 0 again\n";
}

🧚 FILES 🧚

bobcat/lm β€” this defines the class interface. That's where it lives. 🏠


⭐ SEE ALSO ⭐

bobcat(7), manipulators(3bobcat), mlm(3bobcat), ofoldstream(3bobcat)

Go read those if you want the full lore. The cross-references ate, fr fr.


πŸ’€ BUGS πŸ’€

None Reported.

(We love a clean bug report. No notes. Perfect. Periodt.)


πŸ‘‘ 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 really. That's the name. It's iconic in a very specific way and we respect it. πŸ’–


This is free software, distributed under the terms of the GNU General Public License (GPL). Free as in freedom, bestie. πŸ•ŠοΈ


πŸ’… AUTHOR πŸ’…

Frank B. Brokken (f.b.brokken@rug.nl). The legend himself. 🫢


And that's the whole page, gorgeous. This manual page came to you from libbobcat-dev_6.15.01, dated 2005-2026 β€” a whole era of bobcat excellence, and the lm manipulator is still out here setting left margins like a boss. Slay, stay safe, and always check your buffer type before you insert. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from