changeset 23503:6a2fed2d39ac

improve some function names * ov-classdef.cc, ov-classdef.h, ov-fcn.h, pt-eval.cc: Rename is_postfix_index_handled to accepts_postfix_index. Rename meta_is_postfix_index_handled to meta_accepts_postfix_index. Change all uses. * ov-fcn.h (octave_function::accepts_postfix_index): Don't accept '{'.
author John W. Eaton <jwe@octave.org>
date Wed, 17 May 2017 16:31:04 -0400
parents c6714ae1c06c
children 973adfdd2b85
files libinterp/octave-value/ov-classdef.cc libinterp/octave-value/ov-classdef.h libinterp/octave-value/ov-fcn.h libinterp/parse-tree/pt-eval.cc
diffstat 4 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-classdef.cc	Wed May 17 14:34:05 2017 -0400
+++ b/libinterp/octave-value/ov-classdef.cc	Wed May 17 16:31:04 2017 -0400
@@ -1031,8 +1031,8 @@
     return subsref (type, l, nargout);
   }
 
-  bool is_postfix_index_handled (char type) const
-  { return object.meta_is_postfix_index_handled (type); }
+  bool accepts_postfix_index (char type) const
+  { return object.meta_accepts_postfix_index (type); }
 
   bool
   is_classdef_constructor (const std::string& cname = "") const
@@ -3310,7 +3310,7 @@
             // function call at this stage.
 
             if (type.size () > 1
-                && ! fcn->is_postfix_index_handled (type[1]))
+                && ! fcn->accepts_postfix_index (type[1]))
               {
                 octave_value_list tmp_args;
 
--- a/libinterp/octave-value/ov-classdef.h	Wed May 17 14:34:05 2017 -0400
+++ b/libinterp/octave-value/ov-classdef.h	Wed May 17 16:31:04 2017 -0400
@@ -549,7 +549,7 @@
 
   virtual void meta_release (void) { }
 
-  virtual bool meta_is_postfix_index_handled (char /* type */) const
+  virtual bool meta_accepts_postfix_index (char /* type */) const
   { return false; }
 
 protected:
@@ -596,8 +596,8 @@
 
   void meta_release (void) { get_rep ()->meta_release (); }
 
-  bool meta_is_postfix_index_handled (char type) const
-  { return get_rep ()->meta_is_postfix_index_handled (type); }
+  bool meta_accepts_postfix_index (char type) const
+  { return get_rep ()->meta_accepts_postfix_index (type); }
 
 private:
   cdef_meta_object_rep * get_rep (void)
@@ -665,7 +665,7 @@
 
     void meta_release (void);
 
-    bool meta_is_postfix_index_handled (char type) const
+    bool meta_accepts_postfix_index (char type) const
     { return (type == '(' || type == '.'); }
 
     octave_value construct (const octave_value_list& args);
@@ -1086,7 +1086,7 @@
     meta_subsref (const std::string& type,
                   const std::list<octave_value_list>& idx, int nargout);
 
-    bool meta_is_postfix_index_handled (char type) const
+    bool meta_accepts_postfix_index (char type) const
     { return (type == '(' || type == '.'); }
 
   private:
@@ -1310,7 +1310,7 @@
 
     void meta_release (void);
 
-    bool meta_is_postfix_index_handled (char type) const
+    bool meta_accepts_postfix_index (char type) const
     { return (type == '.'); }
 
     octave_value find (const std::string& nm);
--- a/libinterp/octave-value/ov-fcn.h	Wed May 17 14:34:05 2017 -0400
+++ b/libinterp/octave-value/ov-fcn.h	Wed May 17 16:31:04 2017 -0400
@@ -195,8 +195,8 @@
 
   virtual void accept (octave::tree_walker&) { }
 
-  virtual bool is_postfix_index_handled (char type) const
-  { return (type == '(' || type == '{'); }
+  virtual bool accepts_postfix_index (char type) const
+  { return (type == '('); }
 
   virtual octave_value_list
   call (int nargout = 0,
--- a/libinterp/parse-tree/pt-eval.cc	Wed May 17 14:34:05 2017 -0400
+++ b/libinterp/parse-tree/pt-eval.cc	Wed May 17 16:31:04 2017 -0400
@@ -977,7 +977,7 @@
         int nargout = m_nargout_stack.top ();
 
         if (fcn && ! (expr.is_postfix_indexed ()
-                      && fcn->is_postfix_index_handled (expr.postfix_index ())))
+                      && fcn->accepts_postfix_index (expr.postfix_index ())))
           {
             retval = fcn->call (nargout);
           }
@@ -1197,7 +1197,7 @@
                       {
                         octave_function *fcn = tmp.function_value (true);
 
-                        if (fcn && ! fcn->is_postfix_index_handled (type[i]))
+                        if (fcn && ! fcn->accepts_postfix_index (type[i]))
                           {
                             tmp_list = fcn->call (1);
 
@@ -1738,7 +1738,7 @@
         octave_function *f = val.function_value (true);
 
         if (f && ! (expr.is_postfix_indexed ()
-                    && f->is_postfix_index_handled (expr.postfix_index ())))
+                    && f->accepts_postfix_index (expr.postfix_index ())))
           {
             retval = f->call (nargout);
           }