PrintHelper.h
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <string>
21 
23 
27 class PrintHelper {
28 
29 public:
34  PrintHelper(char pMarker)
35  {
36  mDivider = std::string(60, pMarker);
37  }
38 
43 
48  void addLine(const std::string& pLine)
49  {
50  mLines.push_back(pLine);
51  }
52 
57  {
59  for (std::string line: mLines)
60  ROS_INFO_STREAM(line);
62  mLines = std::vector<std::string>(); // reset mLines.
63  }
64 
69  void printAsHeader(const std::string& pLine)
70  {
71  addLine(pLine);
72  printAsHeader();
73  }
74 
75 private:
76 
80  std::string mDivider;
81 
85  std::vector<std::string> mLines;
86 
87 };
88 
89 }
void addLine(const std::string &pLine)
Definition: PrintHelper.h:48
void printAsHeader(const std::string &pLine)
Definition: PrintHelper.h:69
#define ROS_INFO_STREAM(args)
std::vector< std::string > mLines
Definition: PrintHelper.h:85


asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 03:57:54