]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix header wobbles.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 18 Sep 2002 15:11:37 +0000 (15:11 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 18 Sep 2002 15:11:37 +0000 (15:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@6458 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_matrix_array.h

index de0b218f20e2f658f73ca40c1610a82317730cfd..33a6123bdb89415f4955a1929a306ca32888d230 100644 (file)
 
 #ifdef HAVE_STD_STRINGSTREAM
 #  include <sstream>
-#  define STRINGSTREAM std::ostringstream
 #else
 #  include <strstream>
-#  define STRINGSTREAM std::ostrstream
 #endif
 
 //TODO:[GK] Obtain aux vector from VectorMemory
@@ -131,7 +129,7 @@ class BlockMatrixArray : public Subscriptor
                                      * Print the block structure as a
                                      * LaTeX-array.
                                      */
-    void print_latex (ostream& out) const;
+    void print_latex (std::ostream& out) const;
     
   protected:
                                     /**
@@ -507,14 +505,14 @@ BlockMatrixArray<MATRIX>::n_block_cols () const
 template <class MATRIX>
 inline
 void
-BlockMatrixArray<MATRIX>::print_latex (ostream& out) const
+BlockMatrixArray<MATRIX>::print_latex (std::ostream& out) const
 {
   out << "\\begin{array}{"
       << std::string(n_block_cols(), 'c')
       << "}" << std::endl;
 
   Table<2,std::string> array(n_block_rows(), n_block_cols());
-  typedef map<const MATRIX*, std::string> NameMap;
+  typedef std::map<const MATRIX*, std::string> NameMap;
   NameMap matrix_names;
   
   typename std::vector<Entry>::const_iterator m = entries.begin();
@@ -527,21 +525,39 @@ BlockMatrixArray<MATRIX>::print_latex (ostream& out) const
        {
          std::pair<typename NameMap::iterator, bool> x =
            matrix_names.insert(
-             std::pair<const MATRIX*, std::string> (m->matrix, std::string("M")));
-         STRINGSTREAM stream;
+             std::pair<const MATRIX*, std::string> (m->matrix,
+                                                     std::string("M")));
+#ifdef HAVE_STD_STRINGSTREAM
+          std::ostringstream stream;
+#else
+          std::ostrstream stream;
+#endif
+
          stream << matrix_number++;
-         stream << std::ends;
+
+#ifndef HAVE_STD_STRINGSTREAM
+          stream << std::ends;
+#endif
          x.first->second += stream.str();
        }
 
-      STRINGSTREAM stream;
+#ifdef HAVE_STD_STRINGSTREAM
+          std::ostringstream stream;
+#else
+          std::ostrstream stream;
+#endif
+
       if (m->prefix != 1.)
        stream << " " << m->prefix << 'x';
       stream << matrix_names.find(m->matrix)->second;
       stream << '(' << m->matrix << ')';
       if (m->transpose)
        stream << "^T";
+
+#ifndef HAVE_STD_STRINGSTREAM
       stream << std::ends;
+#endif
+      
       array(m->row, m->col) += stream.str();
     }
   for (unsigned int i=0;i<n_block_rows();++i)

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.