Beam-lib  2.16.3
This is the Beam C++ class library.
BTable.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * BTable.h Simple table of data with CSV output
3  * T.Barnaby, BEAM Ltd, 2009-02-10
4  * Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
5  *******************************************************************************
6  */
7 #ifndef BTable_H
8 #define BTable_H
9 
10 #include <BArray.h>
11 #include <BString.h>
12 
13 class BTable {
14 public:
15  BTable();
16  ~BTable();
17 
18  void clear();
19  void setTitle(BArray<BString> title);
21 
22  void print();
23 
24 private:
25  void calculateWidths();
26  void printLine(BArray<BString> line, int comment = 0);
27 
28  BArray<BString> otitle;
29  BList<BArray<BString> > odata;
30  BArray<int> ocolumnWidths;
31 };
32 
33 #endif
Definition: BTable.h:13
BTable()
Definition: BTable.cpp:9
Template based list class.
Definition: BList.h:30
void setTitle(BArray< BString > title)
Definition: BTable.cpp:19
~BTable()
Definition: BTable.cpp:12
void addRow(BArray< BString > data)
Definition: BTable.cpp:23
char data[8]
Definition: BoapMc1.h:21
void print()
Definition: BTable.cpp:47
void clear()
Definition: BTable.cpp:15