FBB::Align(3bobcat)

🌸 FBB::Align β€” a.k.a. FBB::Align(3bobcat) πŸ’…

okay bestie, this is the Table Element Alignment page from the bobcat manual β€” it lives in section 3bobcat and it's genuinely iconic, let's get into it ✨

✨ NAME ✨

FBB::Align β€” the class that aligns elements inside Table objects πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <bobcat/align>

Linking option: -lbobcat

πŸ’– DESCRIPTION πŸ’–

So basically, this class makes objects that the class FBB::Table uses to define the alignment of its columns and/or its elements. That's the whole vibe. Lowkey essential, highkey cute. πŸ’…


πŸ‘‘ NAMESPACE πŸ‘‘

FBB

Every constructor, member, operator and manipulator that gets a shoutout on this man-page is defined in the namespace FBB. periodt.


🌈 INHERITS FROM 🌈

-

(yeah. nothing. it inherits from nobody, it's self-made, main character energy 😌)


πŸ“ ADDITIONAL TYPEDEF πŸ“

The type FBB::Manipulator is a little shorthand bestie, you can use it for:

std::ios_base &(*)(std::ios_base &)

which is literally the prototype of the standard io-manipulators like std::left. no cap.


πŸ’œ MANIPULATOR πŸ’œ

The following manipulator β€” heads up, it's not part of the FBB::Align class itself, it's defined in the FBB namespace β€” can be passed as an Align-object constructor argument, and can also be stored inside Align objects through, like, setManip:

  • FBB::center:
not me noticing the list is exactly one item long with a dangling colon πŸ’€ it is what it is, that's what the page says, we respect the source.

πŸŽ€ CONSTRUCTORS πŸŽ€

  • Align(Manipulator manip) β€” this one sets up an alignment that, once it's inserted into a Table, gets used for all of that table's elements. And here's the tea β˜•: this general alignment type can be modified for specific columns and/or specific elements using the next few constructors, so it's giving "default setting, but you can overrule me";
  • Align(size_t column = 0, Manipulator manip = std::right) β€” this defines how the content of column column of a Table object is aligned. ⚠️ When you use this one, it's your responsibility as the programmer to make sure that column actually exists (i.e. the Table must have a column index column). The class is not gonna hold your hand, bestie;
  • Align(int row, size_t column, Manipulator manip) β€” this one defines the alignment of element [row][column] of a Table object. Before you use this constructor, table element [row][column] must already have been defined. For example, like:
Table tab{  3, Table::ROWWISE };
tab << "xx00x " << " x01x " << " x02xx" <<
        10 << 11 << 12;

tab << Align(1, 1, FBB::center);

Copy and move constructors (and assignment operators) are available too, so you can shuffle these around freely 🫢


πŸ”₯ OVERLOADED OPERATORS πŸ”₯

  • operator size_t() const β€” returns the value representing a requested width of an element in a Table object.

⭐ MEMBER FUNCTIONS ⭐

  • size_t col() const β€” returns the object's column index;
  • bool hasRow() const β€” returns true if the object's member returns a sensible value;
  • size_t row() const β€” returns the object's row index;
  • Manipulator manip() const β€” returns the Manipulator stored in the object;
  • void setWidth(size_t width) β€” defines the field-width of the element(s) of a Table object that the Align object refers to;
  • void setManip(Manipulator manip) β€” changes the Manipulator that's currently stored in the object.

🌸 EXAMPLE 🌸

See the table(3bobcat) man-page. (yes, we're gatekeeping, go read it, it slaps πŸ’–)


🧚 FILES 🧚

bobcat/align β€” defines the class interface


🌈 SEE ALSO 🌈

bobcat(7), csvtable(3bobcat), manipulator(3bobcat), table(3bobcat)


πŸ’€ BUGS πŸ’€

None Reported. (a clean slate, we love to see it ✨)


πŸŽ€ 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. cute name, strong name, no notes πŸ’…


This is free software, distributed under the terms of the GNU General Public License (GPL).


🫢 AUTHOR 🫢

Frank B. Brokken (f.b.brokken@rug.nl).


and that's the whole page bestie, mwah πŸ’‹

this little cutie came to you courtesy of libbobcat-dev_6.15.01, dated 2005-2026 β€” yes, the version number and the date range, we're being thorough, we're being iconic, we're logging off πŸŽ€βœ¨

πŸ“¦ where this page comes from