Table.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <sstream>
4 
5 #include "boca/latex/Command.hh"
6 #include "boca/latex/Row.hh"
7 
8 namespace boca
9 {
10 
11 namespace latex
12 {
13 
14 class Table
15 {
16 
17 public:
18 
19  Table(std::string const &header);
20 
21  Table(Table const &table);
22 
23  template <typename ... Arguments>
24  void AddRow(Arguments ... arguments)
25  {
26  AddRow(Row(arguments ...));
27  }
28 
29  void AddRow(Row const &row);
30 
31  void AddLine();
32 
33  void AddCaption(std::string const &caption);
34 
35  std::string str() const;
36 
37 private:
38 
39  std::stringstream stream_;
40 
41  bool first_ = true;
42 
43  Environment table_ = Environment("table");
44 
45  Environment tabular_ = Environment("tabular", false);
46 
47 };
48 
49 }
50 
51 }
void AddLine()
Definition: Table.cpp:40
void AddRow(Arguments...arguments)
Definition: Table.hh:24
Table(std::string const &header)
Definition: Table.cpp:17
Boosted Collider Analysis.
Definition: Analysis.hh:15
Definition: Table.hh:14
Definition: Command.hh:169
Definition: Row.hh:13
void AddCaption(std::string const &caption)
Definition: Table.cpp:46
std::string str() const
Definition: Table.cpp:52