Mercurial > octave
diff libinterp/octave-value/ov.h @ 24668:d4dd741b2794
new octave_value functions for formatting output
* ov.h, ov.cc, ov-base.h, ov-base.cc, and numeric/matrix-like objects:
(get_edit_display_format): New function.
(edit_display): Pass float_display_format as argument.
* pr-output.h, pr-output.cc: New variants of the octave_print_internal
functions that accept display formats. Expose functions for getting
display formats.
* variable-editor-model.cc: Maintain display format for model.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 01 Feb 2018 06:36:50 -0500 |
parents | 78aff6f14227 |
children | 6652d3823428 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h Wed Jan 31 22:21:51 2018 -0600 +++ b/libinterp/octave-value/ov.h Thu Feb 01 06:36:50 2018 -0500 @@ -48,6 +48,7 @@ } class Cell; +class float_format; class mxArray; class octave_map; class octave_scalar_map; @@ -1275,9 +1276,12 @@ void short_disp (std::ostream& os) const { rep->short_disp (os); } - std::string edit_display (octave_idx_type i, octave_idx_type j) const + float_display_format get_edit_display_format (void) const; + + std::string edit_display (const float_display_format& fmt, + octave_idx_type i, octave_idx_type j) const { - return rep->edit_display (i, j); + return rep->edit_display (fmt, i, j); } int type_id (void) const { return rep->type_id (); }