diff libinterp/octave-value/ov-class.cc @ 30888:32d2b6604a9f

doc: Ensure documentation lists output argument when it exists for functions in libinterp/ For new users of Octave it is best to show explicit calling forms in the documentation and to show a return argument when it exists. * __ftp__.cc, __magick_read__.cc, __pchip_deriv__.cc, bitfcns.cc, bsxfun.cc, call-stack.cc, cellfun.cc, chol.cc, conv2.cc, data.cc, debug.cc, defaults.cc, det.cc, dirfns.cc, display.cc, dot.cc, error.cc, event-manager.cc, fft.cc, fft2.cc, fftn.cc, file-io.cc, getgrent.cc, getpwent.cc, getrusage.cc, graphics.cc, hash.cc, help.cc, input.cc, interpreter.cc, kron.cc, load-path.cc, mappers.cc, max.cc, nproc.cc, oct-hist.cc, pager.cc, pinv.cc, psi.cc, rand.cc, settings.cc, sighandlers.cc, stream-euler.cc, strfns.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, utils.cc, variables.cc, __fltk_uigetfile__.cc, audiodevinfo.cc, audioread.cc, fftw.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-java.cc, ov-struct.cc, ov-typeinfo.cc, ov-usr-fcn.cc, ov.cc, octave.cc, profiler.cc: Add return arguments to @deftypefn macros where they were missing. Attempt to use standard naming convention for return variables. Occasionally improved the docstring itself by re-wording or adding code examples.
author Rik <rik@octave.org>
date Mon, 04 Apr 2022 10:31:48 -0700
parents 08b08b7f05b2
children 670a0d878af1
line wrap: on
line diff
--- a/libinterp/octave-value/ov-class.cc	Mon Apr 04 00:20:48 2022 -0400
+++ b/libinterp/octave-value/ov-class.cc	Mon Apr 04 10:31:48 2022 -0700
@@ -1727,13 +1727,13 @@
 DEFMETHOD (class, interp, args, ,
            doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{classname} =} class (@var{obj})
-@deftypefnx {} {} class (@var{s}, @var{id})
-@deftypefnx {} {} class (@var{s}, @var{id}, @var{p}, @dots{})
-Return the class of the object @var{obj}, or create a class with
-fields from structure @var{s} and name (string) @var{id}.
-
-Additional arguments name a list of parent classes from which the new class
-is derived.
+@deftypefnx {} {@var{cls} =} class (@var{s}, @var{classname})
+@deftypefnx {} {@var{cls} =} class (@var{s}, @var{classname}, @var{parent1}, @dots{})
+Return the class of the object @var{obj}, or create a class with fields from
+structure @var{s} and name (string) @var{classname}.
+
+Additional arguments name a list of parent classes from which the new class is
+derived.
 @seealso{typeinfo, isa}
 @end deftypefn */)
 {
@@ -1911,7 +1911,7 @@
 
 DEFUN (__parent_classes__, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn {} {} __parent_classes__ (@var{x})
+@deftypefn {} {@var{Ccls} =} __parent_classes__ (@var{x})
 Undocumented internal function.
 @end deftypefn */)
 {
@@ -2038,7 +2038,7 @@
                inf_class.c_str (), sup_class.c_str ());
     }
 
-  return octave_value();
+  return ovl ();
 }
 
 // The following classes allow us to define "inline" function objects as
@@ -2148,14 +2148,11 @@
 
 DEFUN (__inline_ctor__, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn {} {} __inline_ctor__ (@var{prop_struct})
-Internal function.
-
+@deftypefn {} {@var{inline_obj} =} __inline_ctor__ (@var{prop_struct})
 Implements final construction for inline objects.
 @end deftypefn */)
 {
   // Input validation has already been done in input.m.
-
   return octave_value (new octave_inline (args(0).map_value ()));
 }