File: abstract_class.h

package info (click to toggle)
android-platform-development 10.0.0%2Br36-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 135,564 kB
  • sloc: java: 160,253; xml: 127,434; python: 40,579; cpp: 17,579; sh: 2,569; javascript: 1,612; ansic: 879; lisp: 261; ruby: 183; makefile: 172; sql: 140; perl: 88
file content (83 lines) | stat: -rw-r--r-- 1,602 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#if GOLDEN_RETURN_TYPE_DIFF
#define LISTEN_RETURN_TYPE \
    int
#define LISTEN_RETURN_STATEMENT \
    return 0;
#else
#define LISTEN_RETURN_TYPE \
    void
#define LISTEN_RETURN_STATEMENT \
    return;
#endif

#if GOLDEN_VTABLE_DIFF
#define VIRTUAL_FUNCTIONS \
    virtual LISTEN_RETURN_TYPE Listen() = 0; \
    virtual void Speak() = 0; \
    static void SpeakLouder();
#else
#define VIRTUAL_FUNCTIONS \
    virtual void Speak() = 0; \
    virtual LISTEN_RETURN_TYPE Listen() = 0; \
    void SpeakLouder();
#endif

#if GOLDEN_ENUM_EXTENSION
#define LOUD_SUPERLATIVES \
    Loudest = 3, \
    Lower = 0,\
    LouderThanLoudest = 5
#elif GOLDEN_ENUM_DIFF
#define LOUD_SUPERLATIVES \
    Loudest = -1,
#else
#define LOUD_SUPERLATIVES \
    Loudest = 3, \
    Lower = 0
#endif

class SuperSpeaker {
  enum Volume {
    Loud = 1,
    Louder = 2,
    LOUD_SUPERLATIVES
  };
#if GOLDEN_CHANGE_FUNCTION_ACCESS
 private:
#else
 public:
#endif
  static SuperSpeaker *CreateSuperSpeaker(int id);
 public:
  VIRTUAL_FUNCTIONS
  Volume SpeakLoud();
  void SpeakLoudest() {}
  virtual ~SuperSpeaker() {}
 private:
#if GOLDEN_CHANGE_MEMBER_NAME_SAME_OFFSET
  int mSpeakderId_;
#else
  int mSpeakderId;
#endif

#if GOLDEN_FUNCTION_POINTER
#if GOLDEN_FUNCTION_POINTER_ADD_PARAM
  SuperSpeaker * (*speaker_fp)(int, char, int);
#else
  SuperSpeaker * (*speaker_fp)(int, char);
#endif
#endif

#if GOLDEN_WITH_INTERNAL_STRUCT
#ifdef GOLDEN_WITH_PUBLIC_INTERNAL_STRUCT
 public:
#else
 private:
#endif
  struct InternalStruct {
    int internal;
  };
 private:
  InternalStruct a;
#endif  // GOLDEN_WITH_INTERNAL_STRUCT
};