lshal: remove ListCommand addLine
Remove obnoxious addLine(...) in ListCommand.cpp by moving
the feature of selecting columns into the "Table" class.
Test: lshal
Test: lshal -m
Test: lshal -d (shows debug info for context hub)
Test: lshal_test
Bug: 35389839
Change-Id: Ieb4a6e544ef39c9f1a63b046a44b6a8e1416ea62
diff --git a/cmds/lshal/TextTable.h b/cmds/lshal/TextTable.h
index 4636f15..91d522a 100644
--- a/cmds/lshal/TextTable.h
+++ b/cmds/lshal/TextTable.h
@@ -21,8 +21,6 @@
#include <string>
#include <vector>
-#include "TableEntry.h"
-
namespace android {
namespace lshal {
@@ -68,6 +66,8 @@
void add(const std::string& s) { mTable.emplace_back(s); }
void add(std::string&& s) { mTable.emplace_back(std::move(s)); }
+ void addAll(TextTable&& other);
+
// Prints the table to out, with column widths adjusted appropriately according
// to the content.
void dump(std::ostream& out) const;