File: mlm.yo

package info (click to toggle)
bobcat 2.08.01-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,668 kB
  • ctags: 953
  • sloc: cpp: 10,403; makefile: 9,042; perl: 401; sh: 195
file content (80 lines) | stat: -rw-r--r-- 2,503 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
includefile(header.inc)

COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::mlm)(3bobcat)(_CurYrs_)(libbobcat1-dev__CurVers_-x.tar.gz)
                    (OFoldStream manipulator)

manpagename(FBB::mlm)(Manipulator modifying left margins of OFoldStream
                      objects) 

manpagesynopsis()
    bf(#include <bobcat/ofoldstream>) or nl()
    bf(#include <bobcat/ofoldstreambuf>) nl()
    Linking option: tt(-lbobcat) 

manpagedescription()

The tt(mlm) class implements a manipulator that can be inserted into
tt(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 tt(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 tt(std::flush)
or tt(std::endl) manipulator that is inserted into the stream. If a line is
still empty once an tt(mlm) object and a tt(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 em(bad_cast) exception is thrown when the manipulator is inserted into an
tt(ostream) that is not using a tt(OFoldStreambuf) buffer.

includefile(namespace.inc)

manpagesection(INHERITS FROM)
    -

manpagesection(CONSTRUCTOR)
    itemization(
    itb(mlm(int addValue))
    )
    The standard copy constructor is available.

manpagesection(MEMBER FUNCTIONS)
    There are no public or protected member functions in this class. 

manpagesection(EXAMPLE)
        verb(
    #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";
        return 0;
    }
        )

manpagefiles()
    em(bobcat/mlm) - defines the class interface

manpageseealso()
    bf(bobcat)(7), bf(manipulators)(3bobcat), bf(lm)(3bobcat), 
    bf(ofoldstream)(3bobcat)

manpagebugs()
    None Reported.

includefile(trailer.inc)