omx_classmagic.h

Go to the documentation of this file.
00001 
00043 #ifndef OMX_CLASSMAGIC_H_
00044 #define OMX_CLASSMAGIC_H_
00045 
00046 
00047 #ifdef DOXYGEN_PREPROCESSING
00048 #define CLASS(a) class a { public:
00049 #define DERIVEDCLASS(a, b) class a : public b { public:
00050 #define ENDCLASS(a) a##_FIELDS };
00051 #else
00052 #define CLASS(a) typedef struct a a; \
00053  struct a { 
00054 #define DERIVEDCLASS(a, b) typedef struct a a; \
00055  struct a {
00056 #define ENDCLASS(a) a##_FIELDS };
00057 #endif
00058 
00059 #if 0 /*EXAMPLES*/
00060 
00063 CLASS(A)
00064 #define A_FIELDS \
00065  \
00066     int a; \
00067  \
00068     int ash;
00069 ENDCLASS(A)
00070  
00071 
00074 DERIVEDCLASS(B,A)
00075 #define B_FIELDS A_FIELDS \
00076  \
00077     int b;
00078 ENDCLASS(B)
00079 
00080 
00083 DERIVEDCLASS(B2,A)
00084 #define B2_FIELDS A_FIELDS \
00085  \
00086     int b2;
00087 ENDCLASS(B2)
00088 
00089 
00092 DERIVEDCLASS(C,B)
00093 #define C_FIELDS B_FIELDS \
00094  \
00095     int c;
00096 ENDCLASS(C)
00097 
00098 #endif /* 0 */
00099 
00100 #endif

Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo