CERN -> IPT Group -> FrameMaker at CERN
Information Service User's Guide

B.2 Employee class

The Employee class inherits the Person class and calls it's publishGuts and refreshGuts methods internally.

1: #ifndef EMPLOYEE_H
2: #define EMPLOYEE_H
3:
4: #include <Person.h>
5:
6: // <<BeginUserCode>>
7:
8: // <<EndUserCode>>
9: /**
10: * Describes a worker person
11: *
12: * @author generated by the IS tool
13: * @version 21/02/03
14: */
15:
16: class Employee: public Person {
17: public:
18:
19: /**
20: * Employee's salary
21: */
22: unsigned short salary;
23:
24:
25: Employee( )
26: : Person( "Employee" )
27: {
28: salary = 3000;
29:
30: // <<BeginUserCode>>
31:
32: // <<EndUserCode>>
33: }
34:
35: ~Employee(){
36:
37: // <<BeginUserCode>>
38:
39: // <<EndUserCode>>
40: }
41:
42: protected:
43: Employee( const char * type )
44: : Person( type )
45: {
46: salary = 3000;
47:
48: // <<BeginUserCode>>
49:
50: // <<EndUserCode>>
51: }
52:
53: void publishGuts( ISostream & out ){
54: Person::publishGuts( out );
55: out << salary;
56: }
57:
58: void refreshGuts( ISistream & in ){
59: Person::refreshGuts( in );
60: in >> salary;
61: }
62:
63: // <<BeginUserCode>>
64:
65: // <<EndUserCode>>
66: };
67:
68: // <<BeginUserCode>>
69:
70: // <<EndUserCode>>
71: #endif // EMPLOYEE_H


2 July 1998 - WebMaster
Copyright © CERN 1998