changeset 10324:7673850d6adf

make simple handles printed inline
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 15 Feb 2010 08:55:46 +0100
parents ee93dbfba45b
children 8b3cfc1288e2
files src/ChangeLog src/ov-fcn-handle.h
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Feb 15 08:40:28 2010 +0100
+++ b/src/ChangeLog	Mon Feb 15 08:55:46 2010 +0100
@@ -1,3 +1,8 @@
+2010-02-15  Jaroslav Hajek  <highegg@gmail.com>
+
+	* ov-fcn-handle.h (octave_fcn_handle::print_as_scalar): New method
+	override.
+
 2010-02-15  Jaroslav Hajek  <highegg@gmail.com>
 
 	* ov-fcn-handle.cc (octave_fcn_handle::is_equal_to): New method.
--- a/src/ov-fcn-handle.h	Mon Feb 15 08:40:28 2010 +0100
+++ b/src/ov-fcn-handle.h	Mon Feb 15 08:55:46 2010 +0100
@@ -144,6 +144,9 @@
 
   void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
 
+  // Simple function handles are printed without a newline.
+  bool print_as_scalar (void) const { return nm != anonymous; }
+
 private:
 
   bool set_fcn (const std::string &octaveroot, const std::string& fpath);