From: Fahad Alrashed Date: Sun, 9 Nov 2014 06:39:25 +0000 (-0600) Subject: Added clear() to TableHandler X-Git-Tag: v8.2.0-rc1~76^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6192b4ba28e7cb0651ed8f5b80f9c6e661ae8d3;p=dealii.git Added clear() to TableHandler --- 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)