m09_OOP_aux_1onPage

m09_OOP_aux_1onPage - ~list_obj(); . . . }; bEgInSlIdE...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion Inheritance (example) class crv_obj : public attr_obj { . . . public: crv_obj(); crv_obj( const crv_obj *_obj ); ~crv_obj(); . . . }; class srf_obj : public attr_obj { . . . public: srf_obj(); srf_obj( const srf_obj *_obj ); ~srf_obj(); . . . };
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion Inheritance (cont.) class attr_obj : public list_obj { protected: list_obj *attr; . . . public: attr_obj( size_t s = 0 ); attr_obj( const attr_obj *a, size_t s = 0 ); virtual ~attr_obj(); void set_attr( string_type nm, object_type *ob ); void set_attr( string_type nm, string_type st ); void set_attr( string_type nm, real_type fl ); void set_attr( string_type nm, int in ); . . . };
Background image of page 2
bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion Inheritance (cont.) class list_obj : public object_type { list_obj *next; list_obj *prev; . . . public: /* Constructor. */ list_obj( size_t s ); list_obj( const list_obj *l, size_t s );
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ~list_obj(); . . . }; bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion Inheritance (cont.) class object_type : public memory_block_type { obj_info_type *t_tag; . . . public: object_type( size_t s = 0 ); /* General functions for all objects. */ boolean_type has_links() const; boolean_type has_attrs() const; inline obj_info_type *obj_info() const; /* Polymorphic methods. */ virtual void dbg_obj( int lvl = 0 ) const; void pr_obj( int lvl = 0 ) const; . . . }; bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion Inheritance (cont.) class memory_block_type { static void *last_allocated_block[4]; static void *last_freed_block; unsigned long m_size; void set_freed(); public: memory_block_type( size_t s ); ~memory_block_type(); void *operator new( size_t s ); void operator delete( void *mp ); . . . };...
View Full Document

This note was uploaded on 04/14/2011 for the course CS 234122 taught by Professor Gillbarequet during the Spring '11 term at Technion.

Page1 / 5

m09_OOP_aux_1onPage - ~list_obj(); . . . }; bEgInSlIdE...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online