]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
new default format
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Feb 2000 15:16:20 +0000 (15:16 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 Feb 2000 15:16:20 +0000 (15:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@2460 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/data_out_base.h
deal.II/base/source/data_out_base.cc

index a692f06645b4db1cc386517ea6b4a1e20e04596c..05ff4c046fc7a2428453e3fe97b9be9d501ee734 100644 (file)
@@ -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
index 84cee1f462908fdba91bef43ba4487bfb4b499a4..58922cc1daf1ee5c7748ea5345888071e94519a7 100644 (file)
@@ -1730,8 +1730,8 @@ template <int dim>
 void DataOutInterface<dim>::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<dim>::write (ostream &out,
 
 
 template <int dim>
-void DataOutInterface<dim>::set_format(OutputFormat fmt)
+void DataOutInterface<dim>::set_default_format(OutputFormat fmt)
 {
-  default_format = fmt;
+  Assert(fmt != default_format, ExcNotImplemented());
+  default_fmt = fmt;
 }
 
 
@@ -1813,8 +1814,8 @@ void DataOutInterface<dim>::set_flags (const GmvFlags &flags)
 template <int dim>
 string DataOutInterface<dim>::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 <int dim>
 void DataOutInterface<dim>::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);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.