/usr/share/doc/libbobcat2-dev/man/table.3.html is in libbobcat-dev 2.20.01-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | <html><head>
<title>FBB::Table</title>
<link rev="made" href="mailto:Frank B. Brokken: f.b.brokken@rug.nl">
</head>
<body text="#27408B" bgcolor="#FFFAF0">
<hr>
<h1>FBB::Table</h1>
<h2>libbobcat1-dev_2.20.01-x.tar.gz</h2>
<h2>2005-2011</h2>
<html><head>
<link rev="made" href="mailto:Frank B. Brokken: f.b.brokken@rug.nl">
</head>
<body text="#27408B" bgcolor="#FFFAF0">
<hr>
<h1></h1>
<html><head>
<title>FBB::Table(3bobcat)</title>
<link rev="made" href="mailto:Frank B. Brokken: f.b.brokken@rug.nl">
</head>
<body text="#27408B" bgcolor="#FFFAF0">
<hr>
<h1>FBB::Table(3bobcat)</h1>
<h2>libbobcat1-dev_2.20.01-x.tar.gz Table-formatter</h2>
<h2>2005-2011</h2>
<p>
<h2>NAME</h2>FBB::Table - Generates row- or column-wise filled tables
<p>
<h2>SYNOPSIS</h2>
<strong>#include <bobcat/table></strong><br>
Linking option: <em>-lbobcat</em>
<p>
<h2>DESCRIPTION</h2>
<p>
<strong>FBB::Table</strong> objects can be used to create tables. The tables are filled
either column-wise or row-wise. Many of the table's characteristics may be
fine-tuned using a separate <strong>FBB::TableSupport</strong> object, described in a
separate man-page (<strong>TableSupport</strong>(3bobcat)). When no <strong>FBB::TableSupport</strong>
object is used, a plain row-wise or column-wise table is constructed
which can be inserted into a <strong>std::ostream</strong>.
<p>
Tables defined by <em>Table</em> consist of a (number of element dependent)
number of rows and a fixed number of columns, the latter value is specified at
construction time. Columns and rows are normally addressed using index values
(starting at 0). Before the leftmost column, between the columns and beyond
the last column <em>separators</em> are defined. By default the separators are
empty, but each separator may be given a (fixed) width or content. The
separator before column <em>col</em> is addressed as separator <em>col</em>, the
rightmost separator is addressed as separator <em>nColummns</em>.
<p>
Likewise, rows can be separated from each other using separators. These
separating rows are also empty by default. The row-separator before row
<em>row</em> is addressed as row-separator <em>row</em>. The row-separator following the
final row is addressed as row-separator <em>nRows</em>, where <em>nRows</em> is the
value returned by the <em>nRows</em> member function.
<p>
Non-default (i.e., non-empty) separators are defined using
<em>FBB::TableSupport</em> objects (cf. <strong>tablesupport</strong>(3bobcat)).
<p>
<em>Table</em> objects look a lot like <em>ostream</em> objects, but they also adopt
a fairly rigid way to define new elements: each new insertion defines another
table element, and it is difficult to end a row before it has received its
<em>nColumn</em> number of elements. <em>Table</em>'s sister-class, <em>TableBuf</em>, is a
<em>std::streambuf</em> type of class, offering additional control through the use
of a wrapping <em>ostream</em> class object.
<p>
<h2>NAMESPACE</h2>
<strong>FBB</strong><br>
All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace <strong>FBB</strong>.
<p>
<h2>INHERITS FROM</h2>
<p>
<strong>std::ostringstream</strong> - <em>Table</em> inherits from <strong>std::ostringstream</strong>,
allowing insertions into a <strong>Table</strong> object. Each separate insertion adds
another element to the <strong>Table</strong> object.
<p>
<strong>FBB::TableBase</strong> - This class implements common elements of the
table implementation (the <em>FBB::TableBuf</em> class is also derived from
<em>TableBase</em>. The <em>TableBase</em> class is not intended to be used otherwise,
and no separate man-page is provided. All facilities provided by <em>Table</em>
inherited from <em>TableBase</em> are described in this man-page.
<p>
<h2>ENUMERATIONS</h2>
The following enumerations are defined by the class <strong>FBB::Table</strong>:
<strong>enum FillDirection</strong><br>
This enumeration defines two values:
<ul>
<li> <strong>ROWWISE</strong>:<br>
When this value is specified at construction time, elements are added
row-wise to the table. I.e., the second element inserted into the <strong>Table</strong>
will be found in the second column of the first row.
<li> <strong>COLUMNWISE</strong>:<br>
When this value is specified at construction time, elements are added
column-wise to the table. I.e., the second element will be found in the second
row of the first column.
</ul>
<p>
<strong>enum WidthType</strong><br>
This enumeration defines two values:
<ul>
<li> <strong>COLUMNWIDTH</strong>:<br>
This value may be specified when the columns should be allowed
variable widths. In this case each column will be as wide as its widest
element. This is the default <strong>WidthType</strong> used by <strong>Table</strong> objects.
<li> <strong>EQUALWIDTH</strong>:<br>
This value may be specified when all the table's columns should have
equal width (i.e., equal to the width of the widest table element),
</ul>
<p>
<h2>CONSTRUCTORS</h2>
<ul>
<li> <strong>Table(size_t nColumns, Table::FillDirection direction,
Table::WidthType widthType = Table::COLUMNWIDTH)</strong>:<br>
The table's number of columns, the fill directions and the column
width-type must be provided. The number of rows is implied by the combination
of this parameter and the number of elements that is actually inserted into
the <strong>Table</strong> object. The <strong>direction</strong> parameter specifies the way new
elements are added to the <strong>Table</strong> object: row-wise or column-wise. Finally,
the <em>widthType</em> parameter is used to specify the way the width of the
table's columns is determined. Each column either defines its own width or all
columns have equal widths.
<li> <strong>Table(TableSupport &tableSupport, Table::FillDirection direction,
Table::WidthType widthType = Table::COLUMNWIDTH)</strong>:<br>
This constructor operates identically to the previous constructor, but
expects an additional reference to a <strong>TableSupport</strong> object. A
<strong>TableSupport</strong> object offers additional formatting features used by the
table defining elements like horizontal lines between rows, additional
separators, etc, etc. The <strong>TableSupport</strong> object is passed as a non-const
reference as the <strong>Table</strong> object must be able to manipulate its data. See
<strong>tablesuppport</strong>(3bobcat) for more information about <em>TableSupport</em>.
</ul>
The copy constructor is not available.
<p>
<h2>OVERLOADED OPERATORS</h2>
<p>
<ul>
<li> <strong>std::ostream &operator<<(std::ostream &str, Table &table)</strong>:<br>
This operator inserts a <strong>Table</strong> into a <em>std::ostream</em> object.
This operator requires a non-const table as it may have to complete the table
by adding empty elements (i.e., empty strings) to obtain a completely filled
rectangular table.
<li> <strong>Table &operator<<(Table &obj, Align const &align)</strong>:<br>
This operator is used to change the default alignment of either a
column or an element. It is a wrapper around the member <em>setAlign()</em> (see
below for its description). By default, all elements are right-aligned. See
<strong>align</strong>(3bobcat) for more information about the <em>Align</em> class.
<li> <strong>Table &operator<<(Table &obj, Type const &x)</strong>:<br>
This overloaded operator is defined as a function template: <strong>Type</strong>
is a template type parameter instantiated to a type for which
<strong>std::ostringstream</strong> insertions are possible. It inserts the value/object
<em>x</em> into the <strong>Table</strong>'s <strong>std::ostringstream</strong> base class object as the
next element of the table.
</ul>
The overloaded assignment operator is not available.
<p>
<h2>MEMBER FUNCTIONS</h2>
<ul>
<li> <strong>Table &append(std::string const &text
char const *sep = " \t", bool addEmpty = false)</strong>:<br>
Fields in <em>text</em> separated by one of the characters in <em>sep</em> are
added as additional elements to the <strong>Table</strong> object. Empty fields are ignored
unless the parameter <em>addEmpty</em> is initialized to <em>true</em>.
<li> <strong>void clear()</strong>:<br>
The contents of the table are erased. All existing elements are
removed, and the table will be empty.
<li> <strong>void clearStr()</strong>:<br>
The contents of its <em>std::ostringstream</em> base class buffer are
erased.
<li> <strong>void fill(InputIterator begin, InputIterator end)</strong>:<br>
This member is defined as a member template; <em>InputIterator</em> is a
template type parameter representing any input iterator. It can also be, e.g.,
a pointer to an insertable type. The iterators must point to data elements
which can be inserted into an <em>std::ostream</em>. The range of values implied by
the member's iterator pair are inserted into the table as new elements.
<li> <strong>void push_back(std::string const &element)</strong>:<br>
New elements can be added to the table using <em>push_back</em>. It is,
e.g., called from a <em>back_inserter</em> adaptor</ul>.
<li> <strong>size_t nRows()</strong>:<br>
The currently available number of rows in the table is returned. Its
value is only defined after calling <strong>def()</strong>.
<li> <strong>Table &setAlign(Align const &align)</strong>:<br>
The alignment type of either a column or an element of the <strong>Table</strong>
object is defined using <em>setAlign</em>. The standard alignments <em>std::left,
std::right</em> and <em>std::internal</em> may be specified, but in addition the
alignment <em>FBB::center</em> may be used if elements should be centered into
their column. A construction like
<pre>
tab << Align(2, FBB::center)
</pre>
requests centering of all elements in the table's column having index
value 2 (i.e., the table's 3rd column), whereas a construction like
<pre>
tab << Align(2, 3, FBB::center)
</pre>
requests centering of element [2][3]. It is the responsibility of the
programmer to ensure that such elements exist. By default, all elements are
right-aligned.
<li> <strong>Table &def()</strong>:<br>
After inserting elements into a <em>Table</em> object its number of
elements may or may not be an integral multiple of the number of columns
specified at construction time. To `complete' a <strong>Table</strong> object to a
rectangular object, for which all column widths and alignments have been
determined <em>def</em> may be called. It is automatically called by
<em>operator<<(ostream, Table)</em>. In other situations it may be called
explicitly to force the insertion of another row in a table using <em>ROWWISE</em>
insertions. With <em>COLUMNWISE</em> insertions its working is complex, since new
elements added to a <em>COLUMNWISE</em> filled table will reshuffle its elements
over the table's columns.
)
<p>
<h2>MANPULATORS</h2>
<ul>
<li> <strong>Table &def(Table &table)</strong>:<br>
This manipulator can be inserted into a table to call the table's
<strong>def()</strong> member.
</ul>
<p>
<h2>EXAMPLE</h2>
<p>
<pre>
#include <iostream>
#include <bobcat/table>
#include <bobcat/tablelines>
using namespace std;
using namespace FBB;
int main(int argc, char **argv)
{
TableLines tablelines;
// width/separators of cols 0, 1 and 2
tablelines << 0 << " | " << " | ";
// hline over cols 1 and 2 of row 1
tablelines << TableLines::HLine(1, 1, 3);
Table tab(tablelines, 3, Table::ROWWISE, Table::EQUALWIDTH);
// or: Table tab(tablelines, 3, Table::ROWWISE);
tab << Align(0, std::left); // set column non-default alignment
tab.fill(argv + 1, argv + argc);// fill range of values
cout << tab << '\n'; // complete the table and insert
tab << "hello" << "" << "wo"; // add additional elements.
if (tab.nRows() > 2)
tab << Align(2, 2, center); // set the layout of a specific element
cout << tab << '\n';
}
</pre>
<p>
<h2>FILES</h2>
<em>bobcat/table</em> - defines the class interface;<br>
<p>
<h2>SEE ALSO</h2>
<strong>bobcat</strong>(7), <strong>align</strong>(3bobcat), <strong>manipulator</strong>(3bobcat),
<strong>tablebuf</strong>(3bobcat), <strong>tablelines</strong>(3bobcat),
<strong>tablesupport</strong>(3bobcat)
<p>
<h2>BUGS</h2>
Note that <em>def()</em> will reshuffle elements over the table's
columns when new elements are added to the table subsequent to calling
<em>def()</em>
<p>
<h2>DISTRIBUTION FILES</h2>
<ul>
<li> <em>bobcat_2.20.01-x.dsc</em>: detached signature;
<li> <em>bobcat_2.20.01-x.tar.gz</em>: source archive;
<li> <em>bobcat_2.20.01-x_i386.changes</em>: change log;
<li> <em>libbobcat1_2.20.01-x_*.deb</em>: debian package holding the
libraries;
<li> <em>libbobcat1-dev_2.20.01-x_*.deb</em>: debian package holding the
libraries, headers and manual pages;
<li> <em>http://sourceforge.net/projects/bobcat</em>: public archive location;
</ul>
<p>
<h2>BOBCAT</h2>
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
<p>
<h2>COPYRIGHT</h2>
This is free software, distributed under the terms of the
GNU General Public License (GPL).
<p>
<h2>AUTHOR</h2>
Frank B. Brokken (<strong>f.b.brokken@rug.nl</strong>).
<p>
|