Mercurial > hg > octave-lyh
diff src/ov.h @ 4640:2d237a76dbdd
[project @ 2003-11-22 11:24:44 by jwe]
author | jwe |
---|---|
date | Sat, 22 Nov 2003 11:24:44 +0000 |
parents | d44675070f1a |
children | ef3a14fb6847 |
line wrap: on
line diff
--- a/src/ov.h +++ b/src/ov.h @@ -756,8 +756,7 @@ 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, c_name); } \ + static void register_type (void); \ \ private: \ static int t_id; \ @@ -767,7 +766,13 @@ #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::c_name (c) + const std::string t::c_name (c); \ + void t::register_type (void) \ + { \ + t_id = octave_value_typeinfo::register_type (t::t_name, \ + t::c_name, \ + octave_value (new t)); \ + } // If TRUE, print a warning for assignments like //