diff libinterp/octave-value/ov-base.h @ 20700:68e3a747ca02

rename octave_value value extractors that accept error message args * ov.h, ov.cc (octave_value::xcell_value, octave_value::xstring_value, octave_value::xcellstr_value): Rename functions that accept error message args. Handle error directly. Only forward to functions that don't attempt type conversion. Change all uses. * ov-base.h, ov-base.cc (octave_base_value::xstring_value): Don't do type conversion. (octave_base_value::cell_value, octave_base_value::cellstr_value): Delete versions that accept error message args. * ov-str-mat.h, ov-str-mat.cc (octave_char_matrix_str::string_value, octave_char_matrix_str::cell_value): Delete.
author John W. Eaton <jwe@octave.org>
date Fri, 13 Nov 2015 14:10:26 -0500
parents b0b37f0d7e6d
children f7084eae3318
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base.h	Thu Nov 12 19:27:25 2015 -0800
+++ b/libinterp/octave-value/ov-base.h	Fri Nov 13 14:10:26 2015 -0500
@@ -481,8 +481,6 @@
 
   virtual Cell cell_value (void) const;
 
-  virtual Cell cell_value (const char *fmt, va_list args) const;
-
   virtual Matrix matrix_value (bool = false) const;
 
   virtual FloatMatrix float_matrix_value (bool = false) const;
@@ -566,13 +564,8 @@
 
   virtual std::string string_value (bool force = false) const;
 
-  virtual std::string string_value (const char *fmt, va_list args) const;
-
   virtual Array<std::string> cellstr_value (void) const;
 
-  virtual Array<std::string>
-  cellstr_value (const char *fmt, va_list args) const;
-
   virtual Range range_value (void) const;
 
   virtual octave_map map_value (void) const;
@@ -617,6 +610,11 @@
 
   virtual void convert_to_row_or_column_vector (void);
 
+  // The following extractor functions don't perform any implicit type
+  // conversions.
+
+  virtual std::string xstring_value () const;
+
   virtual bool print_as_scalar (void) const { return false; }
 
   virtual void print (std::ostream& os, bool pr_as_read_syntax = false);
@@ -832,6 +830,8 @@
 
 private:
 
+  void wrong_type_arg_error (void) const;
+
   static int curr_print_indent_level;
   static bool beginning_of_line;