FBB::mlm(3bobcat)
β¨ FBB::mlm β the OFoldStream left-margin manipulator β¨
okay bestie, sit down, hydrate π this is a page from the bobcat manual (section 3bobcat), and it's about a tiny little manipulator with main character energy.
πΈ NAME πΈ
FBB::mlm β a manipulator that changes the left margins of OFoldStream objects π
π SYNOPSIS π
#include <bobcat/ofoldstream> or
#include <bobcat/ofoldbuf>
Linking option: -lbobcat
like. that's it. that's the whole synopsis. slay β¨
π¦ DESCRIPTION π¦
So the mlm class is a manipulator, and you insert it into OFoldStream objects to nudge the stream's left margin by however much you ask for. π«Ά
Important bit: your request can never end up giving you a negative left margin. If the arithmetic of your request would produce a negative value, then left margin 0 gets used β silently. no drama, no error, it just clamps to zero and moves on. it's giving graceful π
Depending on the tab-setting of the OFoldStream, the value you insert means either the number of blank space characters or the number of tab-characters that get added to the left margin. iykyk π
Now β the timing. β° Your request gets processed at the next newline character or std::flush or std::endl manipulator that's inserted into the stream. But wait, there's a little plot twist: if a line is still empty once an mlm 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 β check the example section below for the receipts π
β οΈ and here's the vibe check that can go wrong: abad_castexception gets thrown when the manipulator is inserted into anostreamthat is not using anOFoldBufbuffer. not me getting caught slipping π
π NAMESPACE π
FBB
All constructors, members, operators and manipulators mentioned in this man-page are defined in the namespace FBB. periodt β¨
π§ INHERITS FROM π§
-
(yep β nothing. no inheritance. it's independent. it doesn't need a parent, it's built different π)
β CONSTRUCTOR β
mlm(int addValue)β makes your manipulator, holding the amount to add to the left margin β¨
Copy and move constructors (and assignment operators) are available. so yes bestie, you can copy it, move it, assign it, the whole buffet π
π MEMBER FUNCTIONS π
std::ostream &modify(std::ostream &out) constβ this one is normally not directly called from user-programs. instead, the insertion operator calls it for you when you insert themlmmanipulator. it's the backstage crew, not the main act π
π EXAMPLE π
okay here's the whole thing, verbatim, no cap:
#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)" << mlm(4) << "\n"
"this uses a 4 character wide left margin\n" <<
mlm(-10) << flush <<
"left margin -6 changed to 0, active on this line\n";
}
see that mlm(-10) after the margin was 4? that's -6 arithmetic, which would be negative, so it silently becomes 0 and kicks in on that line. iconic behaviour honestly π
π FILES π
bobcat/mlmβ defines the class interface
π SEE ALSO π
bobcat(7), manipulators(3bobcat), lm(3bobcat), ofoldstream(3bobcat)
go read those too, they're all in the same friend group π«Ά
π BUGS π
None Reported.
(which is honestly the flex of the century β¨)
π 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β.
(not me thinking that's kind of a serve π )
π COPYRIGHT π
This is free software, distributed under the terms of the GNU General Public License (GPL).
free as in freedom, bestie. share it, love it, keep the license π«Ά
β¨ AUTHOR β¨
Frank B. Brokken (f.b.brokken@rug.nl).
and that's the whole page, no skips, nothing left out π this was libbobcat-dev_6.15.01, dated 2005-2026, and it's the FBB::mlm(3bobcat) page β go forth and manipulate your margins responsibly, mwah πβ¨
π¦ 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