Mercurial > octave
changeset 23666:a835c62d3001
Backed out changeset 97c3223c17a6
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 21 Jun 2017 10:26:29 -0400 |
parents | 90fdfe448ae6 |
children | 2d4a7ae1f6cd |
files | libinterp/octave-value/ov-classdef.cc libinterp/octave-value/ov-classdef.h libinterp/octave-value/ov-fcn.h |
diffstat | 3 files changed, 9 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-classdef.cc Tue Jun 20 18:39:32 2017 -0700 +++ b/libinterp/octave-value/ov-classdef.cc Wed Jun 21 10:26:29 2017 -0400 @@ -1019,8 +1019,6 @@ octave_function * function_value (bool = false) { return this; } - void stash_dir_name (const std::string& dir) { object.stash_dir_name (dir); } - octave_value_list subsref (const std::string& type, const std::list<octave_value_list>& idx, @@ -2216,19 +2214,6 @@ } void -cdef_class::cdef_class_rep::stash_dir_name (const std::string& dir) -{ - directory = dir; - - for (auto& it : method_map) - { - cdef_method& meth = it.second; - - meth.stash_dir_name (dir); - } -} - -void cdef_class::cdef_class_rep::delete_object (cdef_object obj) { method_iterator it = method_map.find ("delete"); @@ -3083,15 +3068,6 @@ return false; } -void -cdef_method::cdef_method_rep::stash_dir_name (const std::string& dir) -{ - octave_function *fptr = function.function_value (); - - if (fptr) - fptr->stash_dir_name (dir); -} - bool cdef_method::cdef_method_rep::check_access (void) const {
--- a/libinterp/octave-value/ov-classdef.h Tue Jun 20 18:39:32 2017 -0700 +++ b/libinterp/octave-value/ov-classdef.h Wed Jun 21 10:26:29 2017 -0400 @@ -10,7 +10,7 @@ (at your option) any later version. Octave is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of +qWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -538,8 +538,6 @@ virtual bool is_package (void) const { return false; } - virtual void stash_dir_name (const std::string&) { } - virtual octave_value_list meta_subsref (const std::string& /* type */, const std::list<octave_value_list>& /* idx */, @@ -600,9 +598,6 @@ bool meta_accepts_postfix_index (char type) const { return get_rep ()->meta_accepts_postfix_index (type); } - void stash_dir_name (const std::string& dir) - { get_rep ()->stash_dir_name (dir); } - private: cdef_meta_object_rep * get_rep (void) { return dynamic_cast<cdef_meta_object_rep *> (cdef_object::get_rep ()); } @@ -656,9 +651,9 @@ string_vector get_names (void); - void stash_dir_name (const std::string& dir); + void set_directory (const std::string& dir) { directory = dir; } - std::string dir_name (void) const { return directory; } + std::string get_directory (void) const { return directory; } void delete_object (cdef_object obj); @@ -821,17 +816,17 @@ bool is_sealed (void) const { return get_rep ()->is_sealed (); } - void stash_dir_name (const std::string& dir) - { get_rep ()->stash_dir_name (dir); } + void set_directory (const std::string& dir) + { get_rep ()->set_directory (dir); } - std::string dir_name (void) const - { return get_rep ()->dir_name (); } + std::string get_directory (void) const + { return get_rep ()->get_directory (); } std::string get_name (void) const { return get_rep ()->get_name (); } bool is_builtin (void) const - { return dir_name ().empty (); } + { return get_directory ().empty (); } void delete_object (cdef_object obj) { get_rep ()->delete_object (obj); } @@ -1045,8 +1040,6 @@ void set_function (const octave_value& fcn) { function = fcn; } - void stash_dir_name (const std::string& dir); - bool check_access (void) const; bool is_external (void) const { return ! dispatch_type.empty (); }
--- a/libinterp/octave-value/ov-fcn.h Tue Jun 20 18:39:32 2017 -0700 +++ b/libinterp/octave-value/ov-fcn.h Wed Jun 21 10:26:29 2017 -0400 @@ -142,7 +142,7 @@ std::string dir_name (void) const { return my_dir_name; } - virtual void stash_dir_name (const std::string& dir) { my_dir_name = dir; } + void stash_dir_name (const std::string& dir) { my_dir_name = dir; } void lock (void) {