From: wolf Date: Fri, 1 Jul 2005 15:28:27 +0000 (+0000) Subject: Move a few of the dimension-independent functions into the base class. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c120d3ae853ecb7202f93951550acc4d89ed59ff;p=dealii-svn.git Move a few of the dimension-independent functions into the base class. git-svn-id: https://svn.dealii.org/trunk@11043 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 20a5843d7a..3e1b679b1f 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -610,6 +610,50 @@ DataOutBase::get_output_format_names () +std::string +DataOutBase:: +default_suffix (const OutputFormat output_format) +{ + switch (output_format) + { + case dx: + return ".dx"; + + case ucd: + return ".inp"; + + case gnuplot: + return ".gnuplot"; + + case povray: + return ".pov"; + + case eps: + return ".eps"; + + case gmv: + return ".gmv"; + + case tecplot: + return ".dat"; + + case tecplot_binary: + return ".plt"; + + case vtk: + return ".vtk"; + + case deal_II_intermediate: + return ".d2"; + + default: + Assert (false, ExcNotImplemented()); + return ""; + }; +} + + + template void DataOutBase::write_ucd (const std::vector > &patches, const std::vector &data_names, @@ -4389,48 +4433,12 @@ DataOutInterface::set_flags (const Deal_II_IntermediateFlags &flag template std::string DataOutInterface:: -default_suffix (const OutputFormat output_format_) const +default_suffix (const OutputFormat output_format) const { - OutputFormat output_format = output_format_; if (output_format == default_format) - output_format = default_fmt; - - switch (output_format) - { - case dx: - return ".dx"; - - case ucd: - return ".inp"; - - case gnuplot: - return ".gnuplot"; - - case povray: - return ".pov"; - - case eps: - return ".eps"; - - case gmv: - return ".gmv"; - - case tecplot: - return ".dat"; - - case tecplot_binary: - return ".plt"; - - case vtk: - return ".vtk"; - - case deal_II_intermediate: - return ".d2"; - - default: - Assert (false, ExcNotImplemented()); - return ""; - }; + return DataOutBase::default_suffix (default_fmt); + else + return DataOutBase::default_suffix (output_format); }