The Employee class inherits the Person class and calls it's publishGuts and refreshGuts methods internally.
#ifndef EMPLOYEE_H#define EMPLOYEE_H#include <Person.h>// <<BeginUserCode>>// <<EndUserCode>>/** * Describes a worker person * * @author generated by the IS tool * @version 21/02/03 */class Employee: public Person {public: /** * Employee's salary */ unsigned short salary; Employee( ) : Person( "Employee" ) { salary = 3000;// <<BeginUserCode>>// <<EndUserCode>> } ~Employee(){// <<BeginUserCode>>// <<EndUserCode>> }protected: Employee( const char * type ) : Person( type ) { salary = 3000;// <<BeginUserCode>>// <<EndUserCode>> } void publishGuts( ISostream & out ){ Person::publishGuts( out ); out << salary; } void refreshGuts( ISistream & in ){ Person::refreshGuts( in ); in >> salary; }// <<BeginUserCode>>// <<EndUserCode>>};// <<BeginUserCode>>// <<EndUserCode>>#endif // EMPLOYEE_H| 2 July 1998 - WebMaster | Copyright © CERN 1998 |