MRMD 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
PrintTable.hpp
Go to the documentation of this file.
1// Copyright 2024 Sebastian Eibl
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <iomanip>
18#include <iostream>
19
20#include "datatypes.hpp"
21
22namespace mrmd
23{
24namespace util
25{
26template <typename HEAD>
27void printTable(HEAD head)
28{
29 std::cout << " │ " << std::setw(10) << std::setprecision(2) << std::fixed << head << " │ "
30 << std::endl;
31}
32template <typename HEAD, typename... TAIL>
33void printTable(HEAD head, TAIL... tail)
34{
35 std::cout << " │ " << std::setw(10) << std::setprecision(2) << std::fixed << head;
36 printTable(tail...);
37}
38
39template <typename HEAD>
40void printTableSep(HEAD /*head*/)
41{
42 std::cout << "─┼─" << std::setw(10) << std::setprecision(2) << std::fixed << "──────────"
43 << "─┼─" << std::endl;
44}
45template <typename HEAD, typename... TAIL>
46void printTableSep(HEAD /*head*/, TAIL... tail)
47{
48 std::cout << "─┼─" << std::setw(10) << std::setprecision(2) << std::fixed << "──────────";
49 printTableSep(tail...);
50}
51
52} // namespace util
53} // namespace mrmd
void printTableSep(HEAD)
Definition PrintTable.hpp:40
void printTable(HEAD head)
Definition PrintTable.hpp:27
Definition BerendsenBarostat.cpp:18