diff libinterp/octave-value/cdef-class.cc @ 28514:fab862fedf85 stable

allow help to find docstrings for classdef classes and methods (bug #43047) * help.cc (help_system::raw_help_from_symbol_table): Also find docstrings from classdef meta objects (both classes and methods). * cdef-class.h, cdef-class.cc (cdef_class::cdef_class_rep, cdef_class): Store docstring for class and provide access. * ov-classdef.h, ov-classdef.cc (octave_classdef_meta::doc_string): New function to provide access to doc strings for classdef objects and methods. * ov-fcn.h (octave_function::doc_string): Now virtual. New argument for method name.
author John W. Eaton <jwe@octave.org>
date Fri, 29 May 2020 10:57:04 -0400
parents e760fef2829c
children 70d155283f33 0a5b15007766
line wrap: on
line diff
--- a/libinterp/octave-value/cdef-class.cc	Fri May 29 10:56:22 2020 -0400
+++ b/libinterp/octave-value/cdef-class.cc	Fri May 29 10:57:04 2020 -0400
@@ -897,6 +897,8 @@
 
     retval = cdm.make_class (full_class_name, slist);
 
+    retval.doc_string (t->doc_string ());
+
     // Package owning this class
 
     if (! t->package_name ().empty ())