Mercurial > octave-nkf
diff src/ov.h @ 4612:d44675070f1a
[project @ 2003-11-14 19:49:56 by jwe]
author | jwe |
---|---|
date | Fri, 14 Nov 2003 19:50:38 +0000 |
parents | cba347c642e2 |
children | 2d237a76dbdd |
line wrap: on
line diff
--- a/src/ov.h Fri Nov 14 17:48:46 2003 +0000 +++ b/src/ov.h Fri Nov 14 19:50:38 2003 +0000 @@ -604,6 +604,8 @@ virtual std::string type_name (void) const { return rep->type_name (); } + virtual std::string class_name (void) const { return rep->class_name (); } + // Unary and binary operations. friend octave_value do_unary_op (unary_op op, @@ -752,17 +754,20 @@ public: \ int type_id (void) const { return t_id; } \ std::string type_name (void) const { return t_name; } \ + std::string class_name (void) const { return c_name; } \ static int static_type_id (void) { return t_id; } \ static void register_type (void) \ - { t_id = octave_value_typeinfo::register_type (t_name); } \ + { t_id = octave_value_typeinfo::register_type (t_name, c_name); } \ \ private: \ static int t_id; \ - static const std::string t_name; + static const std::string t_name; \ + static const std::string c_name; -#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n) \ +#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \ int t::t_id (-1); \ - const std::string t::t_name (n) + const std::string t::t_name (n); \ + const std::string t::c_name (c) // If TRUE, print a warning for assignments like //