Mercurial > hg > octave-nkf
comparison libinterp/octave-value/ov-classdef.h @ 19295:56bc1464ec59
Implement "isa" for classdef objects.
* ov.h (octave_value::is_instance_of): New method.
* ov-base.h (octave_base_value::is_instance_of): Likewise.
* ov-class.h (octave_class::is_instance_of): New method declaration.
* ov-class.cc (octave_class::is_instance_of): Implement it with
find_parent_class.
* ov-classdef.h (octave_classdef::is_instance_of): New method
declaration.
* ov-classdef.cc (octave_classdef::is_instance_of): Implement it
with lookup_class and is_superclass.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sat, 20 Sep 2014 12:43:25 -0400 |
parents | fe0e34be5576 |
children | fa48651fbb8a |
comparison
equal
deleted
inserted
replaced
19294:bb20384acf7b | 19295:56bc1464ec59 |
---|---|
1420 bool print_name_tag (std::ostream& os, const std::string& name) const; | 1420 bool print_name_tag (std::ostream& os, const std::string& name) const; |
1421 | 1421 |
1422 void print_with_name (std::ostream& os, const std::string& name, | 1422 void print_with_name (std::ostream& os, const std::string& name, |
1423 bool print_padding = true); | 1423 bool print_padding = true); |
1424 | 1424 |
1425 bool is_instance_of (const std::string& cls_name) const; | |
1426 | |
1425 octave_value_list subsref (const std::string& type, | 1427 octave_value_list subsref (const std::string& type, |
1426 const std::list<octave_value_list>& idx, | 1428 const std::list<octave_value_list>& idx, |
1427 int nargout); | 1429 int nargout); |
1428 | 1430 |
1429 octave_value subsref (const std::string& type, | 1431 octave_value subsref (const std::string& type, |