]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move template functions back to header file as is apparently necessary.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Oct 2011 21:16:54 +0000 (21:16 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Oct 2011 21:16:54 +0000 (21:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@24655 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 5e0e73ba7ae7503d5fd89a2d6c6228ff0d144d00..4ada2dbb9e5ec78b806d558e8934d5457fcc9eb8 100644 (file)
@@ -689,6 +689,91 @@ namespace internal
       throw;
     }
   }  
+
+  
+  
+  template <class Archive>
+  void TableEntry::save (Archive & ar,
+                        const unsigned int) const
+  {
+                                    // write first an identifier for the kind
+                                    // of data stored and then the actual
+                                    // data, in its correct data type
+    if (const int *p = boost::get<int>(&value))
+      {
+       char c = 'i';
+       ar & c & *p;
+      }
+    else if (const unsigned int *p = boost::get<unsigned int>(&value))
+      {
+       char c = 'u';
+       ar & c & *p;
+      }
+    else if (const double *p = boost::get<double>(&value))
+      {
+       char c = 'd';
+       ar & c & *p;
+      }
+    else if (const std::string *p = boost::get<std::string>(&value))
+      {
+       char c = 's';
+       ar & c & *p;
+      }
+    else
+      Assert (false, ExcInternalError());
+  }
+
+
+
+  template <class Archive>
+  void TableEntry::load (Archive & ar,
+                        const unsigned int)
+  {
+                                    // following what we do in the save()
+                                    // function, first read in the data type
+                                    // as a one-character id, and then read
+                                    // the data
+    char c;
+    ar & c;
+
+    switch (c)
+      {
+       case 'i':
+       {
+         int val;
+         ar & val;
+         value = val;
+         break;
+       }
+
+       case 'u':
+       {
+         unsigned int val;
+         ar & val;
+         value = val;
+         break;
+       }
+
+       case 'd':
+       {
+         double val;
+         ar & val;
+         value = val;
+         break;
+       }
+
+       case 's':
+       {
+         std::string val;
+         ar & val;
+         value = val;
+         break;
+       }
+
+       default:
+             Assert (false, ExcInternalError());
+      }
+  }  
 }
 
 template <typename T>
index baaec2a236225bcc2ab28395e019fe458e6f5cd6..6de9f3e31959af1738f5063616951f8bf7895856 100644 (file)
@@ -95,88 +95,6 @@ namespace internal
   }
 
 
-  template <class Archive>
-  void TableEntry::save (Archive & ar,
-                        const unsigned int) const
-  {
-                                    // write first an identifier for the kind
-                                    // of data stored and then the actual
-                                    // data, in its correct data type
-    if (const int *p = boost::get<int>(&value))
-      {
-       char c = 'i';
-       ar & c & *p;
-      }
-    else if (const unsigned int *p = boost::get<unsigned int>(&value))
-      {
-       char c = 'u';
-       ar & c & *p;
-      }
-    else if (const double *p = boost::get<double>(&value))
-      {
-       char c = 'd';
-       ar & c & *p;
-      }
-    else if (const std::string *p = boost::get<std::string>(&value))
-      {
-       char c = 's';
-       ar & c & *p;
-      }
-    else
-      Assert (false, ExcInternalError());
-  }
-
-
-
-  template <class Archive>
-  void TableEntry::load (Archive & ar,
-                        const unsigned int)
-  {
-                                    // following what we do in the save()
-                                    // function, first read in the data type
-                                    // as a one-character id, and then read
-                                    // the data
-    char c;
-    ar & c;
-
-    switch (c)
-      {
-       case 'i':
-       {
-         int val;
-         ar & val;
-         value = val;
-         break;
-       }
-
-       case 'u':
-       {
-         unsigned int val;
-         ar & val;
-         value = val;
-         break;
-       }
-
-       case 'd':
-       {
-         double val;
-         ar & val;
-         value = val;
-         break;
-       }
-
-       case 's':
-       {
-         std::string val;
-         ar & val;
-         value = val;
-         break;
-       }
-
-       default:
-             Assert (false, ExcInternalError());
-      }
-  }
 }
 
 /* ------------------------------------------------ */

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.