diff libinterp/octave-value/ov-base.h @ 18314:06eb893b9db6

Implement subsref overloading in classdef. * ov-class.cc (sanitize, make_idx_args): Moved function to ov-base.cc. * ov-base.cc (sanitize, make_idx_args): Moved from ov-class.cc. * ov-base.h (make_udx_args): New API function declaration. * ov-classdef.cc (in_class_method): New utility static function. (octave_classdef::subsref): Use overloaded subsref method if present, only when not already in a class method.
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 20 Jan 2014 14:10:42 -0500
parents e473c4853afc
children ff311e5ff6d8
line wrap: on
line diff
--- a/libinterp/octave-value/ov-base.h	Mon Jan 20 01:41:26 2014 -0500
+++ b/libinterp/octave-value/ov-base.h	Mon Jan 20 14:10:42 2014 -0500
@@ -828,4 +828,12 @@
 // is memory to be saved
 extern OCTINTERP_API bool Vsparse_auto_mutate;
 
+// Utility function to convert C++ arguments used in subsref/subsasgn into an
+// octave_value_list object that can be used to call a function/method in the
+// interpreter.
+extern OCTINTERP_API octave_value
+make_idx_args (const std::string& type,
+               const std::list<octave_value_list>& idx,
+               const std::string& who);
+
 #endif