Mercurial > octave-nkf
diff libinterp/octave-value/ov-class.h @ 19137: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 | bcd71a2531d3 |
children | 76478d2da117 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-class.h Sat Sep 20 06:31:27 2014 -0700 +++ b/libinterp/octave-value/ov-class.h Sat Sep 20 12:43:25 2014 -0400 @@ -167,6 +167,8 @@ octave_base_value *unique_parent_class (const std::string&); + bool is_instance_of (const std::string&) const; + string_vector all_strings (bool pad) const; void print (std::ostream& os, bool pr_as_read_syntax = false);