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

C.2 EmployeeNamed class

The EmployeeNamed class inherits the PersonNamed and calls it's publishGuts and refreshGuts methods internally.

1: #ifndef EMPLOYEENAMED_H
2: #define EMPLOYEENAMED_H
3:
4: #include <PersonNamed.h>
5:
6: // <<BeginUserCode>>
7:
8: // <<EndUserCode>>
9:
10: class EmployeeNamed: public PersonNamed {
11: public:
12:
13: unsigned short salary;
14:
15: EmployeeNamed(const IPCPartition & partition, const char *name)
16: : PersonNamed( partition, name, "Employee" )
17: {
18: salary = 3000;
19:
20: // <<BeginUserCode>>
21:
22: // <<EndUserCode>>
23: }
24:
25: ~EmployeeNamed(){
26:
27: // <<BeginUserCode>>
28:
29: // <<EndUserCode>>
30: }
31:
32: protected:
33: EmployeeNamed( const IPCPartition & partition, const char * name, const char * type )
34: : PersonNamed( partition, name, type )
35: {
36: salary = 3000;
37:
38: // <<BeginUserCode>>
39:
40: // <<EndUserCode>>
41: }
42:
43: void publishGuts( ISostream & out ){
44: PersonNamed::publishGuts( out );
45: out << salary;
46: }
47:
48: void refreshGuts( ISistream & in ){
49: PersonNamed::refreshGuts( in );
50: in >> salary;
51: }
52:
53: // <<BeginUserCode>>
54:
55: // <<EndUserCode>>
56: };
57:
58: // <<BeginUserCode>>
59:
60: // <<EndUserCode>>
61: #endif // EMPLOYEENAMED_H


2 July 1998 - WebMaster
Copyright © CERN 1998