Mercurial > hg > octave-nkf
diff src/ov-scalar.h @ 3219:30770ba4457a
[project @ 1998-11-13 03:44:31 by jwe]
author | jwe |
---|---|
date | Fri, 13 Nov 1998 03:44:36 +0000 |
parents | bc61b0e8d60e |
children | 3ee04ff37b3e |
line wrap: on
line diff
--- a/src/ov-scalar.h +++ b/src/ov-scalar.h @@ -67,12 +67,6 @@ octave_value *clone (void) { return new octave_scalar (*this); } - void *operator new (size_t size) - { return allocator.alloc (size); } - - void operator delete (void *p, size_t size) - { allocator.free (p, size); } - octave_value do_index_op (const octave_value_list& idx); idx_vector index_vector (void) const { return idx_vector (scalar); } @@ -127,28 +121,14 @@ bool print_name_tag (ostream& os, const string& name) const; - int type_id (void) const { return t_id; } - - string type_name (void) const { return t_name; } - - static int static_type_id (void) { return t_id; } - - static void register_type (void) - { t_id = octave_value_typeinfo::register_type (t_name); } - private: // The value of this scalar. double scalar; - // For custom memory management. - static octave_allocator allocator; + DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA - // Type id of scalar objects, set by register_type(). - static int t_id; - - // Type name of scalar objects, defined in ov-scalar.cc. - static const string t_name; + DECLARE_OCTAVE_ALLOCATOR }; #endif