Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSWrapperFactory_p.h 00003 ------------------- 00004 begin : 29/01/2011 00005 copyright : (C) 2003-2011 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef AQSWRAPPERFACTORY_P_H_ 00020 #define AQSWRAPPERFACTORY_P_H_ 00021 00022 #include <qobject.h> 00023 00024 #define AQ_REG_WRAP(Class) \ 00025 registerWrapper(AQ_QUOTEME(Q##Class), AQ_QUOTEME(AQS##Class)) 00026 #define AQ_REG_WRAP_AQOBJECT(Class) \ 00027 registerWrapper(AQ_QUOTEME(AQ##Class), AQ_QUOTEME(AQS##Class)) 00028 00029 #define AQ_CRE_WRAP_OBJECT(Class) \ 00030 if (className == AQ_QUOTEME(Q##Class)) { \ 00031 QObject *o = static_cast<QObject *>(ptr); \ 00032 if (qstrcmp(o->className(), AQ_QUOTEME(Q##Class)) != 0) return o; \ 00033 AQS##Class *qo = new AQS##Class(o); \ 00034 qo->setWrap(); \ 00035 return qo; \ 00036 } 00037 00038 #define AQ_CRE_WRAP_AQOBJECT(Class) \ 00039 if (className == AQ_QUOTEME(AQ##Class)) { \ 00040 QObject *o = static_cast<QObject *>(ptr); \ 00041 if (qstrcmp(o->className(), AQ_QUOTEME(AQ##Class)) != 0) return o; \ 00042 AQS##Class *qo = new AQS##Class(o); \ 00043 qo->setWrap(); \ 00044 return qo; \ 00045 } 00046 00047 #define AQ_CRE_WRAP_VOIDPTR(Class) \ 00048 if (className == AQ_QUOTEME(Q##Class)) { \ 00049 AQS##Class *aqo = new AQS##Class(ptr); \ 00050 aqo->setWrap(); \ 00051 return aqo; \ 00052 } 00053 00054 #define AQ_CRE_WRAP_VOIDPTR_AQOBJECT(Class) \ 00055 if (className == AQ_QUOTEME(AQ##Class)) { \ 00056 AQS##Class *aqo = new AQS##Class(ptr); \ 00057 aqo->setWrap(); \ 00058 return aqo; \ 00059 } 00060 00061 class AQSWrapperFactoryPrivate 00062 { 00063 public: 00064 AQSWrapperFactoryPrivate() { 00065 } 00066 ~AQSWrapperFactoryPrivate() { 00067 } 00068 }; 00069 00070 #endif /* AQSWRAPPERFACTORY_P_H_ */