Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSUnpacker_p.h 00003 ------------------- 00004 begin : 08/03/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 AQSUNPACKER_P_H_ 00020 #define AQSUNPACKER_P_H_ 00021 00022 #include "AQSByteArray_p.h" 00023 #include "AQObjects.h" 00024 00025 class AQSUnpacker : public AQSVoidPtr 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_VOID_AQOBJECT(Unpacker, VoidPtr); 00030 00031 protected: 00032 void specializedInternalFinish() { 00033 if (!wrap_) 00034 delete o_; 00035 } 00036 00037 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00038 public slots: 00039 QString getText() const; 00040 QByteArray getBinary() const; 00041 QStringList errorMessages() const; 00042 00043 protected: 00044 static void *construct(const QSArgumentList &args) { 00045 QMap<int, QStringList> candidates; 00046 candidates[1].append(QString::fromLatin1("QString")); 00047 QString sgt(castArgsSignature(args, candidates)); 00048 if (sgt == QString::fromLatin1("QString")) 00049 return new AQUnpacker(*(argValue<QString *>(args[0]))); 00050 return 0; 00051 } 00052 00053 public: 00054 static QMap<int, QStringList> candidateConstructors() { 00055 QMap<int, QStringList> candidates; 00056 candidates[1].append(QString::fromLatin1("QString")); 00057 return candidates; 00058 } 00059 //@AQ_END_DEF_PUB_SLOTS@ 00060 }; 00061 00062 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00063 inline QString AQSUnpacker::getText() const 00064 { 00065 AQ_CALL_RET_V(getText(), QString); 00066 } 00067 inline QByteArray AQSUnpacker::getBinary() const 00068 { 00069 AQ_CALL_RET_V(getBinary(), QByteArray); 00070 } 00071 inline QStringList AQSUnpacker::errorMessages() const 00072 { 00073 AQ_CALL_RET_V(errorMessages(), QStringList); 00074 } 00075 //@AQ_END_IMP_PUB_SLOTS@ 00076 00077 #endif /* AQSUNPACKER_P_H_ */ 00078 // @AQOBJECT_VOID@