logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

FBB::Align - Class to align elements in Table objects

Additional Typedef

       The type FBB::Manipulator can be used as a shorthand for

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

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

Author

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

libbobcat-dev_6.07.01                               2005-2025                                FBB::Align(3bobcat)

Bobcat

       Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.

Bobcat Project Files

       o      https://fbb-git.gitlab.io/bobcat/: gitlab project page;

       Debian Bobcat project files:

       o      libbobcat6: debian package containing the shared library, changelog and copyright note;

       o      libbobcat-dev: debian package containing the static library, headers, manual pages, and  developer
              info;

Bugs

       None Reported.

Constructors

       o      Align(Manipulatormanip):
              This  constructor  is  used to specify an alignment which, when inserted into a Table, is used for
              all the table’s elements. This general alignment type may be modified of specific  columns  and/or
              elements using the following constructors;

       o      Align(size_tcolumn=0,Manipulatormanip=std::right):
              This  constructor  defines  how the content of column `column’ of a Table object are aligned. When
              used, it is the responsibility of the programmer to ensure that the table’s column  exists  (i.e.,
              the Table must have a column index column);

       o      Align(introw,size_tcolumn,Manipulatormanip):
              This  constructor  defines  the alignment of element [row][column] of a Table object. Before using
              this constructor table element [row][column] must have been defined. E.g.,

                  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.

Description

       This  class  defines  objects  used by the class FBB::Table to define the alignment of its columns and/or
       elements.

Example

       See the table(3bobcat) man-page.

Files

bobcat/align - defines the class interface

Inherits From

       -

Manipulator

       The  following  manipulator  (not  part of the FBB::Align, class but defined in the FBB namespace) can be
       specified as Align-object constructor arguments and  can  be  stored  in  Align  objects  through,  e.g.,
       setManip:

       o      FBB::center:

Member Functions

       o      size_tcol()const:
              Returns the object’s column index;

       o      boolhasRow()const:
              Returns true if the object’s  member returns a sensible value;

       o      size_trow()const:
              Returns the object’s row index;

       o      Manipulatormanip()const:
              Returns the Manipulator stored in the object;

       o      voidsetWidth(size_twidth):
              Defines the field-width of element(s) of a Table object to which the Align object refers;

       o      voidsetManip(Manipulatormanip):
              Changes the object’s currently stored Manipulator.

Name

       FBB::Align - Class to align elements in Table objects

Namespace

FBB
       All constructors, members, operators and manipulators, mentioned in this man-page,  are  defined  in  the
       namespace FBB.

Overloaded Operators

       o      operatorsize_t()const:
              Returns the value representing a requested width of an element in a Table object.

See Also

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

Synopsis

#include<bobcat/align>

       Linking option: -lbobcat

See Also