From e6192b4ba28e7cb0651ed8f5b80f9c6e661ae8d3 Mon Sep 17 00:00:00 2001 From: Fahad Alrashed Date: Sun, 9 Nov 2014 00:39:25 -0600 Subject: [PATCH] Added clear() to TableHandler --- include/deal.II/base/table_handler.h | 5 +++++ source/base/table_handler.cc | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/deal.II/base/table_handler.h b/include/deal.II/base/table_handler.h index 6475386890..e6d81d920e 100644 --- a/include/deal.II/base/table_handler.h +++ b/include/deal.II/base/table_handler.h @@ -513,6 +513,11 @@ public: */ void write_tex (std::ostream &file, const bool with_header=true) const; + /** + * Clears the values in the table. + */ + void clear (); + /** * Read or write the data of this * object to or from a stream for diff --git a/source/base/table_handler.cc b/source/base/table_handler.cc index 8214a0ee0f..59a6332649 100644 --- a/source/base/table_handler.cc +++ b/source/base/table_handler.cc @@ -666,6 +666,20 @@ void TableHandler::write_tex (std::ostream &out, const bool with_header) const } +void TableHandler::clear() +{ + + columns.clear(); + supercolumns.clear(); + column_order.clear(); + tex_supercaptions.clear(); + + tex_table_label.clear(); + tex_table_caption.clear(); + +} + + unsigned int TableHandler::n_rows() const { if (columns.size() == 0) -- 2.39.5