Mercurial > hg > octave-lyh
comparison src/ov-base.h @ 14013:1734ebe27134
move onCleanup function and class to liboctinterp
* ov-oncleanup.h, ov-oncleanup.cc: Move onCleanup class and function here.
* onCleanup.cc: From here.
* DLD-FUNCTIONS/module-list: Delete onCleanup.cc from the list.
* src/Makefile.am (OV_INCLUDES): Add ov-oncleanup.h to the list.
(OV_SRC): add ov-oncleanup.cc to the list.
* ov.cc (register_types): Register octave_oncleanup here.
* ov-typeinfo.cc (octave_value_typeinfo::instance_ok): Do register
cleanup function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 08 Dec 2011 00:52:39 -0500 |
parents | 2a8dcb5b3a00 |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
14012:4faef552363d | 14013:1734ebe27134 |
---|---|
165 int t::t_id (-1); \ | 165 int t::t_id (-1); \ |
166 const std::string t::t_name (n); \ | 166 const std::string t::t_name (n); \ |
167 const std::string t::c_name (c); \ | 167 const std::string t::c_name (c); \ |
168 void t::register_type (void) \ | 168 void t::register_type (void) \ |
169 { \ | 169 { \ |
170 t_id = octave_value_typeinfo::register_type (t::t_name, \ | 170 static t exemplar; \ |
171 t::c_name, \ | 171 octave_value v (&exemplar, true); \ |
172 octave_value (new t ())); \ | 172 t_id = octave_value_typeinfo::register_type (t::t_name, t::c_name, v); \ |
173 } | 173 } |
174 | 174 |
175 // A base value type, so that derived types only have to redefine what | 175 // A base value type, so that derived types only have to redefine what |
176 // they need (if they are derived from octave_base_value instead of | 176 // they need (if they are derived from octave_base_value instead of |
177 // octave_value). | 177 // octave_value). |