From: guido Date: Tue, 22 Feb 2000 15:16:20 +0000 (+0000) Subject: new default format X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=166e29508562c2b7aa24100abeb5d39d17e4600b;p=dealii-svn.git new default format git-svn-id: https://svn.dealii.org/trunk@2460 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/data_out_base.h b/deal.II/base/include/base/data_out_base.h index a692f06645..05ff4c046f 100644 --- a/deal.II/base/include/base/data_out_base.h +++ b/deal.II/base/include/base/data_out_base.h @@ -1119,7 +1119,7 @@ class DataOutBase * Additionally, objects of this class have a default format, which * can be set by the parameter "Output format" of the parameter * file. Within a program, this can be changed by the member function - * #set_format#. Using this default format, it is possible to leave + * #set_default_format#. Using this default format, it is possible to leave * the format selection completely to the parameter file. A suitable * suffix for the output file name can be obtained by #default_suffix# * without arguments. @@ -1134,7 +1134,7 @@ class DataOutInterface : private DataOutBase * Provide a data type specifying the * presently supported output formats. */ - enum OutputFormat { nil, ucd, gnuplot, povray, eps, gmv }; + enum OutputFormat { default_format, ucd, gnuplot, povray, eps, gmv }; /** * Obtain data through the #get_patches# @@ -1179,16 +1179,16 @@ class DataOutInterface : private DataOutBase * requested, the #default_format# is written. * * An error occurs if no format is provided and - * the default format is #nil#. + * the default format is #default_format#. */ - void write (ostream &out, const OutputFormat output_format = nil) const; + void write (ostream &out, const OutputFormat output_format = default_format) const; /** * Set the default format. The value set here - * is used anytime, output for format #nil# is + * is used anytime, output for format #default_format# is * requested. */ - void set_format(const OutputFormat default_format); + void set_default_format(const OutputFormat default_format); /** * Set the flags to be used for output @@ -1235,11 +1235,11 @@ class DataOutInterface : private DataOutBase * \end{itemize} * * If this function is called - * with no argument or #nil#, the + * with no argument or #default_format#, the * suffix for the * #default_format# is returned. */ - string default_suffix (const OutputFormat output_format = nil); + string default_suffix (const OutputFormat output_format = default_format); /** * Return the #OutputFormat# value @@ -1340,11 +1340,11 @@ class DataOutInterface : private DataOutBase private: /** * Standard output format. - * Use this format, if output format nil is + * Use this format, if output format default_format is * requested. It can be changed by the #set_format# * function or in a parameter file. */ - OutputFormat default_format; + OutputFormat default_fmt; /** * Flags to be used upon output of UCD diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 84cee1f462..58922cc1da 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -1730,8 +1730,8 @@ template void DataOutInterface::write (ostream &out, OutputFormat output_format) const { - if (output_format == nil) - output_format = default_format; + if (output_format == default_format) + output_format = default_fmt; switch (output_format) { @@ -1763,9 +1763,10 @@ void DataOutInterface::write (ostream &out, template -void DataOutInterface::set_format(OutputFormat fmt) +void DataOutInterface::set_default_format(OutputFormat fmt) { - default_format = fmt; + Assert(fmt != default_format, ExcNotImplemented()); + default_fmt = fmt; } @@ -1813,8 +1814,8 @@ void DataOutInterface::set_flags (const GmvFlags &flags) template string DataOutInterface::default_suffix (OutputFormat output_format) { - if (output_format == nil) - output_format = default_format; + if (output_format == default_format) + output_format = default_fmt; switch (output_format) { @@ -1909,7 +1910,7 @@ template void DataOutInterface::parse_parameters (ParameterHandler &prm) { const string& output_name = prm.get ("Output format"); - default_format = parse_output_format (output_name); + default_fmt = parse_output_format (output_name); prm.enter_subsection ("UCD output parameters"); ucd_flags.parse_parameters (prm);