Skip to content

Commit 41d58eb

Browse files
committed
table edits
1 parent cea1ef4 commit 41d58eb

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

examples/ex_table.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,14 @@
1515
//
1616
// Author(s): Craig McDonald ([email protected])
1717

18-
#include <MEL/Core/Timer.hpp>
19-
#include <MEL/Logging/DataLogger.hpp>
20-
#include <MEL/Logging/Log.hpp>
21-
#include <MEL/Math/Functions.hpp>
18+
#include <MEL/Logging/Table.hpp>
2219
#include <MEL/Core/Console.hpp>
23-
#include <MEL/Utility/System.hpp>
2420

2521
using namespace mel;
2622

2723
int main() {
2824

29-
std::string filename = "table_data.tbl";
25+
std::string filename = "table_data.csv";
3026
Table tab("my_table", { "col 0", "col 1", "col 2" });
3127
tab.push_back_row({ 1.01, 2.02, 3.03 });
3228
tab.push_back_row({ 4.04, 5.05, 6.06 });
@@ -43,9 +39,8 @@ int main() {
4339
Table new_tab;
4440
std::vector<Table> new_tabs;
4541
if (Table::read(filename, new_tabs)) {
46-
//std::cout << new_tab << std::endl;
4742
for (std::size_t i = 0; i < new_tabs.size(); ++i) {
48-
std::cout << new_tabs[i];
43+
print(new_tabs[i]);
4944
}
5045
}
5146
}

include/MEL/Logging/Table.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
namespace mel{
2424

25+
/// Advanced Data Logging Structure
2526
class Table {
2627
public:
2728
static const std::string table_id;

src/MEL/Logging/Table.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ std::ostream& operator<<(std::ostream& os, const Table& table) {
352352
}
353353
os << table(i, table.n_cols_ - 1) << std::endl;
354354
}
355-
os << std::endl;
356355
return os;
357356
}
358357

0 commit comments

Comments
 (0)