diff src/symtab.h @ 9463:d34baf412786

support non-local function lookups in str2func
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 27 Jul 2009 10:39:09 +0200
parents cf714e75c656
children 25ed2d6aacf6
line wrap: on
line diff
--- a/src/symtab.h
+++ b/src/symtab.h
@@ -538,7 +538,7 @@
 
       octave_value load_class_method (const std::string& dispatch_type);
 
-      octave_value find (const octave_value_list& args = octave_value_list ());
+      octave_value find (const octave_value_list& args, bool local_funcs);
 
       octave_value builtin_find (void);
 
@@ -553,9 +553,9 @@
 	return function_on_path.is_defined ();
       }
 
-      octave_value find_function (const octave_value_list& args = octave_value_list ())
+      octave_value find_function (const octave_value_list& args, bool local_funcs)
       {
-	return find (args);
+	return find (args, local_funcs);
       }
 
       void lock_subfunction (scope_id scope)
@@ -718,7 +718,7 @@
 
     private:
 
-      octave_value xfind (const octave_value_list& args);
+      octave_value xfind (const octave_value_list& args, bool local_funcs);
 
       octave_value x_builtin_find (void);
 
@@ -759,7 +759,11 @@
 	delete rep;
     }
 
-    octave_value find (const octave_value_list& args);
+    octave_value find (const octave_value_list& args = octave_value_list (),
+                       bool local_funcs = true)
+    {
+      return rep->find (args, local_funcs);
+    }
 
     octave_value builtin_find (void)
     {
@@ -791,14 +795,10 @@
       return rep->is_user_function_defined ();
     }
 
-    octave_value find_function (void)
+    octave_value find_function (const octave_value_list& args = octave_value_list (),
+                                bool local_funcs = true)
     {
-      return rep->find_function ();
-    }
-
-    octave_value find_function (const octave_value_list& args)
-    {
-      return rep->find_function (args);
+      return rep->find_function (args, local_funcs);
     }
 
     void lock_subfunction (scope_id scope)
@@ -1033,7 +1033,8 @@
   static octave_value
   find (const std::string& name, 
         const octave_value_list& args = octave_value_list (),
-	bool skip_variables = false);
+	bool skip_variables = false,
+        bool local_funcs = true);
 
   static octave_value builtin_find (const std::string& name);
 
@@ -1172,7 +1173,8 @@
 
   static octave_value
   find_function (const std::string& name, 
-                 const octave_value_list& args = octave_value_list ());
+                 const octave_value_list& args = octave_value_list (),
+                 bool local_funcs = true);
 
   static octave_value find_user_function (const std::string& name)
   {
@@ -1973,7 +1975,7 @@
 
   octave_value
   do_find (const std::string& name, const octave_value_list& args,
-           bool skip_variables);
+           bool skip_variables, bool local_funcs);
 
   octave_value do_builtin_find (const std::string& name);