1 #if GOLDEN_RETURN_TYPE_DIFF
2 #define LISTEN_RETURN_TYPE \
3     int
4 #define LISTEN_RETURN_STATEMENT \
5     return 0;
6 #else
7 #define LISTEN_RETURN_TYPE \
8     void
9 #define LISTEN_RETURN_STATEMENT \
10     return;
11 #endif
12 
13 #if GOLDEN_VTABLE_DIFF
14 #define VIRTUAL_FUNCTIONS \
15     virtual LISTEN_RETURN_TYPE Listen() = 0; \
16     virtual void Speak() = 0; \
17     static void SpeakLouder();
18 #else
19 #define VIRTUAL_FUNCTIONS \
20     virtual void Speak() = 0; \
21     virtual LISTEN_RETURN_TYPE Listen() = 0; \
22     void SpeakLouder();
23 #endif
24 
25 #if GOLDEN_ENUM_EXTENSION
26 #define LOUD_SUPERLATIVES \
27     Loudest = 3, \
28     Lower = 0,\
29     LouderThanLoudest = 5
30 #elif GOLDEN_ENUM_DIFF
31 #define LOUD_SUPERLATIVES \
32     Loudest = -1,
33 #else
34 #define LOUD_SUPERLATIVES \
35     Loudest = 3, \
36     Lower = 0
37 #endif
38 
39 class SuperSpeaker {
40   enum Volume {
41     Loud = 1,
42     Louder = 2,
43     LOUD_SUPERLATIVES
44   };
45 #if GOLDEN_CHANGE_FUNCTION_ACCESS
46  private:
47 #else
48  public:
49 #endif
50   static SuperSpeaker *CreateSuperSpeaker(int id);
51  public:
52   VIRTUAL_FUNCTIONS
53   Volume SpeakLoud();
SpeakLoudest()54   void SpeakLoudest() {}
~SuperSpeaker()55   virtual ~SuperSpeaker() {}
56  private:
57 #if GOLDEN_CHANGE_MEMBER_NAME_SAME_OFFSET
58   int mSpeakderId_;
59 #else
60   int mSpeakderId;
61 #endif
62 
63 #if GOLDEN_FUNCTION_POINTER
64 #if GOLDEN_FUNCTION_POINTER_ADD_PARAM
65   SuperSpeaker * (*speaker_fp)(int, char, int);
66 #else
67   SuperSpeaker * (*speaker_fp)(int, char);
68 #endif
69 #endif
70 
71 #if GOLDEN_WITH_INTERNAL_STRUCT
72 #ifdef GOLDEN_WITH_PUBLIC_INTERNAL_STRUCT
73  public:
74 #else
75  private:
76 #endif
77   struct InternalStruct {
78     int internal;
79   };
80  private:
81   InternalStruct a;
82 #endif  // GOLDEN_WITH_INTERNAL_STRUCT
83 };
84