indent3bobcat
Configurable text indentation
Usage
#include <bobcat/indent>
Overview
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
- o
-
void clear():
Resets the indentation level to zero. Theindentmanipulator will have no visible effect after calling this member.
- o
-
void dec():
Reduces the indentation level by the current increment (4 by default). The indentation level is never reduces to a negative value.
- o
-
void inc():
Increments the indentation level by the current increment (4 by default).
- o
-
void setInc(size_t inc):
Defines the increment value used with thedecandincmembers.
- o
-
void setWidth(size_t width):
Defines the indentation to a specific valuewidth.
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:
- o
-
FBB::decindent:
This manipulator will first callIndent::dec. ThenFBB::indentis called. The effect will be that the indentation level is reduced just before the indentation is inserted.
- o
-
FBB::incindent:
This manipulator will first callIndent::inc. ThenFBB::indentis called. The effect will be that the indentation level is incremented just before the indentation is inserted.
- o
-
FBB::indent:
This manipulator will insert the currently defined number of indentation blanks into the ostream for which it it called.
- o
-
FBB::indentdec:
This manipulator will first callFBB::indent, ThenIndent::decis called. The effect will be that the indentation is inserted first, immediately followed by a reduction of the indentation level.
- o
-
FBB::indentinc:
This manipulator will first callFBB::indent, ThenIndent::incis called. The effect will be that the indentation is inserted first, immediately followed by a increment of the indentation level.
- o
-
FBB::nlindent:
This manipulator will insert a newline character (\n). ThenFBB::indentis called, indenting the next line over the currently defined number of blanks.
Examples
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
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;
Bobcat
Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.
Releases
10 releases since Debian 4.0 (Etch); the text changed 9 times.