diff src/ov-bool-mat.cc @ 2901:e6d25bc478dd

[project @ 1997-04-30 03:41:26 by jwe]
author jwe
date Wed, 30 Apr 1997 03:43:29 +0000
parents c691fdf6bebb
children 4e7bea116f24
line wrap: on
line diff
--- a/src/ov-bool-mat.cc	Wed Apr 30 03:37:00 1997 +0000
+++ b/src/ov-bool-mat.cc	Wed Apr 30 03:43:29 1997 +0000
@@ -28,6 +28,8 @@
 #include <config.h>
 #endif
 
+#include <iostream.h>
+
 #include "lo-ieee.h"
 #include "mx-base.h"
 
@@ -209,11 +211,42 @@
 }
 
 void
-octave_bool_matrix::print (ostream& os, bool pr_as_read_syntax)
+octave_bool_matrix::print (ostream& os, bool pr_as_read_syntax) const
+{
+  indent (os);
+  print_raw (os, pr_as_read_syntax);
+  newline (os);
+}
+
+void
+octave_bool_matrix::print_raw (ostream& os, bool pr_as_read_syntax) const
 {
   Matrix tmp (matrix);
+  octave_print_internal (os, tmp, pr_as_read_syntax,
+			 current_print_indent_level ());
+}
 
-  octave_print_internal (os, tmp, pr_as_read_syntax, struct_indent);
+bool
+octave_bool_matrix::print_name_tag (ostream& os, const string& name) const
+{
+  bool retval = false;
+
+  int nr = rows ();
+  int nc = columns ();
+
+  indent (os);
+
+  if (nr == 1 && nc == 1 || (nr == 0 || nc == 0))
+    os << name << " = ";
+  else
+    {
+      os << name << " =";
+      newline (os);
+      newline (os);
+      retval = true;
+    }
+
+  return retval;
 }
 
 /*