diff libinterp/octave-value/ov.h @ 22283:564203123065

move single and double type conversion functions to ov.cc * ov.h, ov.cc (octave_value::as_double, octave_value::as_double): New functions. (Fdouble): Move here from ov-re-mat.cc. (Fsingle): Move here from ov-flt-re-mat.cc. * ov-type-conv.h (octave_type_conv): New template function, replaces OCTAVE_TYPE_CONV_BODY3 macro. Change all uses. (OCTAVE_TYPE_CONV_BODY): Simplify.
author John W. Eaton <jwe@octave.org>
date Sat, 13 Aug 2016 17:49:18 -0400
parents e43d83253e28
children 8b18f46f6427
line wrap: on
line diff
--- a/libinterp/octave-value/ov.h	Sat Aug 13 17:44:19 2016 -0400
+++ b/libinterp/octave-value/ov.h	Sat Aug 13 17:49:18 2016 -0400
@@ -386,6 +386,11 @@
   octave_value full_value (void) const
   { return rep->full_value (); }
 
+  // Type conversions.
+
+  octave_value as_double (void) const;
+  octave_value as_single (void) const;
+
   octave_base_value *try_narrowing_conversion (void)
   { return rep->try_narrowing_conversion (); }