Mercurial > octave-nkf
diff src/ov-base.h @ 10087:090173f2db40
improve overload dispatching of built-in classes
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 12 Jan 2010 13:20:17 +0100 |
parents | 84b0725f4b09 |
children | cd96d29c5efa |
line wrap: on
line diff
--- a/src/ov-base.h Tue Jan 12 09:03:42 2010 +0100 +++ b/src/ov-base.h Tue Jan 12 13:20:17 2010 +0100 @@ -71,13 +71,31 @@ btyp_uint64, btyp_bool, btyp_char, + btyp_struct, + btyp_cell, + btyp_func_handle, btyp_unknown, btyp_num_types = btyp_unknown }; +extern OCTINTERP_API std::string +btyp_class_name [btyp_num_types]; + +extern OCTINTERP_API string_vector +get_builtin_classes (void); + inline bool btyp_isnumeric (builtin_type_t btyp) { return btyp <= btyp_uint64; } +inline bool btyp_isinteger (builtin_type_t btyp) +{ return btyp >= btyp_int8 && btyp <= btyp_uint64; } + +inline bool btyp_isfloat (builtin_type_t btyp) +{ return btyp <= btyp_float_complex; } + +inline bool btyp_isarray (builtin_type_t btyp) +{ return btyp <= btyp_char; } + // Compute a numeric type for a possibly mixed-type operation, using these rules: // bool -> double // single + double -> single