---
name: "mlm"
section: "3bobcat"
platform: "linux"
package: "libbobcat-dev"
version: "6.07.01-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlm"
---

# mlm(3bobcat)

Manipulator modifying left margins of OFoldStream objects

## NAME

FBB::mlm - Manipulator modifying left margins of OFoldStream objects

## SYNOPSIS

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

## DESCRIPTION

The *mlm* class implements a manipulator that can be inserted into *OFoldStream* objects to modify the stream’s left margin by a requested amount. The request cannot result in a negative left margin value. If a negative left margin would be the arithmetic result of the request then left margin 0 will silently be used.

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 added to 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 empty once an *mlm* 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

  **mlm(int addValue)**:\

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 *mlm* manipulator.

## EXAMPLE

```
    #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)" << mlm(4) << "\n"
               "this uses a 4 character wide left margin\n" <<
                mlm(-10) << flush <<
                "left margin -6 changed to 0, active on this line\n";
    }
```

## FILES

*bobcat/mlm* - defines the class interface

## SEE ALSO

[**bobcat**(7)](/bobcat/7.md), [**manipulators**(3bobcat)](/manipulators/3bobcat.md), [**lm**(3bobcat)](/lm/3bobcat.md), [**ofoldstream**(3bobcat)](/ofoldstream/3bobcat.md)

## BUGS

None Reported.

## 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’.

## COPYRIGHT

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

## AUTHOR

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