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

B.1 Person class

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

1: #ifndef PERSON_H
2: #define PERSON_H
3:
4: #include <is/info.h>
5:
6: #include <owl/time.h>
7:
8: // <<BeginUserCode>>
9:
10: // <<EndUserCode>>
11: /**
12: * Describes a human person
13: *
14: * @author generated by the IS tool
15: * @version 21/02/03
16: */
17:
18: class Person: public ISInfo {
19: public:
20: enum sex_E {male, female};
21:
22: /**
23: * Person's name
24: */
25: std::string name;
26:
27: /**
28: * Person's date of birth
29: */
30: OWLDate birth_date;
31:
32: /**
33: * Person's sex
34: */
35: sex_E sex;
36:
37: Person( )
38: : ISInfo( "Person" )
39: {
40: name = "Jone";
41: sex = male;
42:
43: // <<BeginUserCode>>
44:
45: // <<EndUserCode>>
46: }
47:
48: ~Person(){
49:
50: // <<BeginUserCode>>
51:
52: // <<EndUserCode>>
53: }
54:
55: protected:
56: Person( const char * type )
57: : ISInfo( type )
58: {
59: name = "Jone";
60: sex = male;
61:
62: // <<BeginUserCode>>
63:
64: // <<EndUserCode>>
65: }
66:
67: void publishGuts( ISostream & out ){
68: out << name << birth_date << (int)sex;
69: }
70:
71: void refreshGuts( ISistream & in ){
72: in >> name >> birth_date >> (int&)sex;
73: }
74:
75: // <<BeginUserCode>>
76:
77: // <<EndUserCode>>
78: };
79:
80: // <<BeginUserCode>>
81:
82: // <<EndUserCode>>
83: #endif // PERSON_H


2 July 1998 - WebMaster
Copyright © CERN 1998