OpenMAXBellagio  0.9.3
omx_classmagic.h
Go to the documentation of this file.
1 
39 #ifndef OMX_CLASSMAGIC_H_
40 #define OMX_CLASSMAGIC_H_
41 
42 
43 #ifdef DOXYGEN_PREPROCESSING
44 #define CLASS(a) class a { public:
45 #define DERIVEDCLASS(a, b) class a : public b { public:
46 #define ENDCLASS(a) a##_FIELDS };
47 #else
48 #define CLASS(a) typedef struct a a; \
49  struct a {
50 #define DERIVEDCLASS(a, b) typedef struct a a; \
51  struct a {
52 #define ENDCLASS(a) a##_FIELDS };
53 #endif
54 
55 #if 0 /*EXAMPLES*/
56 
59 CLASS(A)
60 #define A_FIELDS \
61  \
62  int a; \
63  \
64  int ash;
65 ENDCLASS(A)
66 
67 
70 DERIVEDCLASS(B,A)
71 #define B_FIELDS A_FIELDS \
72  \
73  int b;
74 ENDCLASS(B)
75 
76 
79 DERIVEDCLASS(B2,A)
80 #define B2_FIELDS A_FIELDS \
81  \
82  int b2;
83 ENDCLASS(B2)
84 
85 
88 DERIVEDCLASS(C,B)
89 #define C_FIELDS B_FIELDS \
90  \
91  int c;
92 ENDCLASS(C)
93 
94 #endif /* 0 */
95 
96 #endif

Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo