FBB::Indent(3) Configurable text indentation

SYNOPSIS

#include <bobcat/indent>

DESCRIPTION

FBB::Indent and its various manipulators offer text-indentation. Text inserted into streams is indented over a fully configurable amount using a set of manipulators and (static) member functions.

NAMESPACE

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

INHERITS FROM

-

STATIC MEMBER FUNCTIONS

  • void clear():
    Resets the indentation level to zero. The indent manipulator will have no visible effect after calling this member.
  • void dec():
    Reduces the indentation level by the current increment (4 by default). The indentation level is never reduces to a negative value.
  • void inc():
    Increments the indentation level by the current increment (4 by default).
  • void setInc(size_t inc):
    Defines the increment value used with the dec and inc members.
  • void setWidth(size_t width):
    Defines the indentation to a specific value width.

MANIPULATORS

The following manipulators (which are not part of the FBB::Indent, class, but are defined in the FBB namespace) can be inserted into the FBB::Indent object:
  • FBB::decindent:
    This manipulator will first call Indent::dec. Then FBB::indent is called. The effect will be that the indentation level is reduced just before the indentation is inserted.
  • FBB::incindent:
    This manipulator will first call Indent::inc. Then FBB::indent is called. The effect will be that the indentation level is incremented just before the indentation is inserted.
  • FBB::indent:
    This manipulator will insert the currently defined number of indentation blanks into the ostream for which it it called.
  • FBB::indentdec:
    This manipulator will first call FBB::indent, Then Indent::dec is called. The effect will be that the indentation is inserted first, immediately followed by a reduction of the indentation level.
  • FBB::indentinc:
    This manipulator will first call FBB::indent, Then Indent::inc is called. The effect will be that the indentation is inserted first, immediately followed by a increment of the indentation level.
  • FBB::nlindent:
    This manipulator will insert a newline character (\n). Then FBB::indent is called, indenting the next line over the currently defined number of blanks.

EXAMPLE

    using namespace std;
    using namespace FBB;
    int main()
    {
        cout << indentinc << "Not indented" <<
                nlindent << "Indenting with 4 blanks\n";
        Indent::clear();
        cout << "No indentation\n";
    }
        

FILES

bobcat/indent - defines the class interface

BUGS

None Reported.

DISTRIBUTION FILES

  • bobcat_4.02.00-x.dsc: detached signature;
  • bobcat_4.02.00-x.tar.gz: source archive;
  • bobcat_4.02.00-x_i386.changes: change log;
  • libbobcat1_4.02.00-x_*.deb: debian package holding the libraries;
  • libbobcat1-dev_4.02.00-x_*.deb: debian package holding the libraries, headers and manual pages;
  • http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

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

COPYRIGHT

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

AUTHOR

Frank B. Brokken ([email protected]).