1 // testsubclass.hh --- unit test for analyzer and complex C++ inheritance
3 // Copyright (C) 2007-2011 Free Software Foundation, Inc.
5 // Author: Eric M. Ludlam <eric@siege-engine.com>
7 // This file is part of GNU Emacs.
9 // GNU Emacs is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU General Public License as published by
11 // the Free Software Foundation, either version 3 of the License, or
12 // (at your option) any later version.
14 // GNU Emacs is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef TESTSUBCLASS_HH
26 #define TESTSUBCLASS_HH
36 virtual void setFeet(int);
42 NAME1, NAME2, NAME3 };
51 int fFeet; // Usually 2 or 4.
61 quadruped(int a) : fQuadPrivate(a)
79 class moose : public animal::moose {
81 moose() : fAntlers(false)
84 void setAntlers(bool);
100 // A second namespace of the same name will test the
101 // namespace merging needed to resolve deer::alces
104 class alces : public animal::moose {
106 alces(int lat) : fLatin(lat)
112 void doLatinStuff(moose moosein); // for completion testing
114 moose createMoose(); // for completion testing.
127 // A third namespace with classes that does protected and private inheritance.
130 class antelope : public animal::quadruped {
133 antelope(int a) : animal::quadruped(),
149 class jackalope : protected animal::quadruped {
152 jackalope(int a) : animal::quadruped(),
161 bool fBunnyProtected;
168 // Nothing specified means private.
169 class bugalope : /* private*/ animal::quadruped {
172 bugalope(int a) : animal::quadruped(),