lm(3bobcat)

lm3bobcat

Manipulator setting left margins of ofoldstream objects

Usage

#include <bobcat/ofoldstream> or
#include <bobcat/ofoldbuf>
Linking option: -lbobcat

Overview

The lm class implements a manipulator that can be inserted into OFoldStream objects to set the stream’s left margin to a requested value.

Depending on the tab-setting of the OFoldStream the inserted value represents the number of blank space characters or the number of tab-characters that will be used for the left margin.

The request will be processed at the next newline character or std::flush or std::endl manipulator that is inserted into the stream. If a line is still once an lm object and a flush manipulator are inserted into the stream then the new left margin will be effective at the next word inserted into that line (cf., the example section below).

A bad_cast exception is thrown when the manipulator is inserted into an ostream that is not using a OFoldBuf buffer.

Namespace

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

Inherits from

-

Constructor

o

lm(size_t newValue):

Copy and move constructors (and assignment operators) are available.

Member functions

o

std::ostream &modify(std::ostream &out) const:
This member is normally not directly called from user-programs. Instead, it is called by the insertion operator when inserting the lm manipulator.

Examples

    #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)" << lm(4) << "\n"
               "this uses a 4 character wide left margin\n" <<
               lm(0) << flush << "at column 0 again\n";
    }

Files

bobcat/lm - 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

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Bugs

None Reported.

Author

Frank B. Brokken ([email protected]).

From libbobcat-dev 6.07.01-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.