Mercurial > hg > octave-lyh
changeset 4967:0355f2f7d193
[project @ 2004-09-07 15:09:14 by jwe]
author | jwe |
---|---|
date | Tue, 07 Sep 2004 15:09:14 +0000 |
parents | 91b61d27b9b4 |
children | c09cbec51190 |
files | src/ChangeLog src/ov-fcn-handle.h src/ov-fcn-inline.h |
diffstat | 3 files changed, 25 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2004-09-07 John W. Eaton <jwe@octave.org> + + * ov-fcn-inline.h (octave_fcn_inline::octave_fcn_inline): New copy + constructor. + (octave_fcn_inline::clone, octave_fcn_inline::empty_clone): + New functions. + + * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle): New copy + constructor. + (octave_fcn_handle::clone, octave_fcn_handle::empty_clone): + New functions. + 2004-09-06 John W. Eaton <jwe@octave.org> * ov.cc (install_types): Call octave_fcn_inline::register_type.
--- a/src/ov-fcn-handle.h +++ b/src/ov-fcn-handle.h @@ -49,8 +49,14 @@ octave_fcn_handle (const octave_value& f, const std::string& n) : fcn (f), nm (n) { } + octave_fcn_handle (const octave_fcn_handle& fh) + : octave_base_value (fh), fcn (fh.fcn), nm (fh.nm) { } + ~octave_fcn_handle (void) { } + octave_value *clone (void) const { return new octave_fcn_handle (*this); } + octave_value *empty_clone (void) const { return new octave_fcn_handle (); } + octave_value subsref (const std::string&, const std::list<octave_value_list>&) { @@ -79,12 +85,6 @@ private: - // No copying! - - octave_fcn_handle (const octave_fcn_handle& fh); - - octave_fcn_handle& operator = (const octave_fcn_handle& fh); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
--- a/src/ov-fcn-inline.h +++ b/src/ov-fcn-inline.h @@ -50,13 +50,19 @@ public: octave_fcn_inline (void) - : octave_fcn_handle(), iftext (), ifargs () { } + : octave_fcn_handle (), iftext (), ifargs () { } octave_fcn_inline (const std::string& f, const string_vector& a, const std::string& n = std::string ()); + octave_fcn_inline (const octave_fcn_inline& fi) + : octave_fcn_handle (fi), iftext (fi.iftext), ifargs (fi.ifargs) { } + ~octave_fcn_inline (void) { } + octave_value *clone (void) const { return new octave_fcn_inline (*this); } + octave_value *empty_clone (void) const { return new octave_fcn_inline (); } + bool is_inline_function (void) const { return true; } octave_fcn_inline *fcn_inline_value (bool = false) { return this; } @@ -73,12 +79,6 @@ private: - // No copying! - - octave_fcn_inline (const octave_fcn_inline& fh); - - octave_fcn_inline& operator = (const octave_fcn_inline& fh); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA