This source file includes following definitions.
- fIsValid
- fAntyProtected
- fBunny
- fBug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #ifndef TESTSUBCLASS_HH
26 #define TESTSUBCLASS_HH
27
28 namespace animal {
29
30 class moose {
31 public:
32 moose() : fFeet(0),
33 fIsValid(false)
34 { }
35
36 virtual void setFeet(int);
37 int getFeet();
38
39 void doNothing();
40
41 enum moose_enum {
42 NAME1, NAME2, NAME3 };
43
44
45 protected:
46
47 bool fIsValid;
48 int fIsProtectedInt;
49
50 private:
51 int fFeet;
52 bool fIsPrivateBool;
53
54 };
55
56 int two_prototypes();
57 int two_prototypes();
58
59 class quadruped {
60 public:
61 quadruped(int a) : fQuadPrivate(a)
62 { }
63
64 int fQuadPublic;
65
66 protected:
67 int fQuadProtected;
68
69 private:
70 int fQuadPrivate;
71
72 };
73
74 }
75
76
77 namespace deer {
78
79 class moose : public animal::moose {
80 public:
81 moose() : fAntlers(false)
82 { }
83
84 void setAntlers(bool);
85 bool getAntlers();
86
87 void doSomething();
88
89 protected:
90
91 bool fSomeField;
92
93 private:
94 bool fAntlers;
95
96 };
97
98 }
99
100
101
102 namespace deer {
103
104 class alces : public animal::moose {
105 public:
106 alces(int lat) : fLatin(lat)
107 { }
108
109 void setLatin(bool);
110 bool getLatin();
111
112 void doLatinStuff(moose moosein);
113
114 moose createMoose();
115
116 protected:
117 bool fAlcesBool;
118 int fAlcesInt;
119
120 private:
121 bool fLatin;
122 int fGreek;
123 };
124
125 };
126
127
128 namespace sneaky {
129
130 class antelope : public animal::quadruped {
131
132 public:
133 antelope(int a) : animal::quadruped(),
134 fAntyProtected(a)
135 {}
136
137 int fAntyPublic;
138
139 bool testAccess();
140
141 protected:
142 int fAntyProtected;
143
144 private :
145 int fAntyPrivate;
146
147 };
148
149 class jackalope : protected animal::quadruped {
150
151 public:
152 jackalope(int a) : animal::quadruped(),
153 fBunny(a)
154 {}
155
156 int fBunnyPublic;
157
158 bool testAccess();
159
160 protected:
161 bool fBunnyProtected;
162
163 private :
164 bool fBunnyPrivate;
165
166 };
167
168
169 class bugalope : animal::quadruped {
170
171 public:
172 bugalope(int a) : animal::quadruped(),
173 fBug(a)
174 {}
175
176 int fBugPublic;
177
178 bool testAccess();
179 protected:
180 bool fBugProtected;
181
182 private :
183 bool fBugPrivate;
184
185 };
186
187
188 };
189
190 #endif