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

C.1 PersonNamed class

This is declaration for the PersonNamed class produced by the IS generator application. User can put his own code between the BeginUserCode and EndUserCode comments. When the PersonNamed.h file is regenerated the code in this sections is preserved.

1: #ifndef PERSONNAMED_H
2: #define PERSONNAMED_H
3:
4: #include <is/isnamedinfo.h>
5:
6: #include <owl/time.h>
7:
8: // <<BeginUserCode>>
9:
10: // <<EndUserCode>>
11:
12: class PersonNamed: public ISNamedInfo {
13: public:
14: enum sex_E {male, female};
15:
16: std::string name;
17:
18: OWLDate birth_date;
19:
20: sex_E sex;
21:
22: PersonNamed(const IPCPartition & partition, const char *name)
23: : ISNamedInfo( partition, name, "Person" )
24: {
25: this -> name = "Jone";
26: sex = male;
27:
28: // <<BeginUserCode>>
29:
30: // <<EndUserCode>>
31: }
32:
33: ~PersonNamed(){
34:
35: // <<BeginUserCode>>
36:
37: // <<EndUserCode>>
38: }
39:
40: protected:
41: PersonNamed( const IPCPartition & partition, const char * name, const char * type )
42: : ISNamedInfo( partition, name, type )
43: {
44: this -> name = "Jone";
45: sex = male;
46:
47: // <<BeginUserCode>>
48:
49: // <<EndUserCode>>
50: }
51:
52: void publishGuts( ISostream & out ){
53: out << name << birth_date << (int)sex;
54: }
55:
56: void refreshGuts( ISistream & in ){
57: in >> name >> birth_date >> (int&)sex;
58: }
59:
60: // <<BeginUserCode>>
61:
62: // <<EndUserCode>>
63: };
64:
65: // <<BeginUserCode>>
66:
67: // <<EndUserCode>>
68: #endif // PERSONNAMED_H


2 July 1998 - WebMaster
Copyright © CERN 1998