Make tmm-menubar work for the Buffers menu again.
[emacs.git] / test / cedet / tests / testusing.hh
blob4c91bf0db24d3e15f7f8c4da91cc86fd8038235e
1 // test usings header file.
3 namespace moose {
5 class Point;
7 class MyClass;
12 namespace moose {
14 class Point;
16 class MyClass {
17 public:
18 MyClass() : fVal(0) {
21 ~MyClass() {};
23 /**
24 * fVal Accessors
25 * @{
27 int getVal() const {
28 return fVal;
30 void setVal(int Val) const {
31 fVal = Val;
33 /**
34 * @}
36 private:
37 int fVal;
42 namespace deer {
44 class Pickle;
48 // Code from Zhiqiu Kong
50 #ifndef BREAD_H
51 #define BREAD_H
53 namespace bread_name {
54 class bread
56 public:
57 void geta();
58 private:
59 int m_a;
60 int m_b;
64 #endif
66 // Code from David Engster
67 // Creating alias types through 'using' trickery
69 namespace somestuff {
70 class OneClass {
71 public:
72 void aFunc();
73 int anInt;
75 struct aStruct {
76 int foo;
77 int bar;
81 namespace otherstuff {
82 // make otherstuff::OneClass an alias for somestuff::OneClass
83 using somestuff::OneClass;
86 namespace morestuff {
87 // make morestuff an alias namespace for somestuff
88 using namespace somestuff;
89 // but hide aStruct with own type
90 struct aStruct {
91 int anotherFoo;
92 int anotherBar;
96 // We can also create an alias for an alias
97 namespace evenmorestuff {
98 using otherstuff::OneClass;
101 // Now with nested namespaces
102 namespace outer {
103 namespace inner {
104 struct StructNested {
105 int one;
106 int two;
108 struct AnotherStruct {
109 int three;
110 int four;
115 // Elevate the first struct into 'outer'
116 // so that we can access it via 'outer::StructNested'
117 namespace outer {
118 using outer::inner::StructNested;
121 // Create an alias for a nested namespace
122 namespace outerinner {
123 // equivalent to 'namespace outerinner = outer::inner;'
124 using namespace outer::inner;
127 // arch-tag: f7e59fad-100b-47d3-ae8b-a8390a026ade