Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSBuffer_p.h 00003 ------------------- 00004 begin : 28/02/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 AQSBUFFER_P_H_ 00020 #define AQSBUFFER_P_H_ 00021 00022 #include "AQSIODevice_p.h" 00023 #include "AQSByteArray_p.h" 00024 #include <qbuffer.h> 00025 00026 // @AQ_PTR_INDIRECTION@ 00027 00028 class AQSBuffer : public AQSIODevice 00029 { 00030 Q_OBJECT 00031 00032 AQ_DECLARE_AQS_VOID(Buffer, IODevice); 00033 00034 protected: 00035 void specializedInternalFinish() { 00036 if (!wrap_) 00037 delete o_; 00038 } 00039 00040 public slots: 00041 QIODevice *ioDevice() const { 00042 return static_cast<QIODevice *>(o_); 00043 } 00044 00045 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00046 public slots: 00047 QByteArray buffer() const; 00048 bool setBuffer(QByteArray *); 00049 bool setBuffer(AQSByteArray *); 00050 00051 protected: 00052 static void *construct(const QSArgumentList &args) { 00053 QMap<int, QStringList> candidates; 00054 candidates[0].append(QString::null); 00055 candidates[1].append(QString::fromLatin1("QByteArray*")); 00056 QString sgt(castArgsSignature(args, candidates)); 00057 if (sgt.isEmpty()) 00058 return new QBuffer; 00059 if (sgt == QString::fromLatin1("QByteArray*")) 00060 return new QBuffer(*argValue<QByteArray *>(args[0])); 00061 return 0; 00062 } 00063 00064 public: 00065 static QMap<int, QStringList> candidateConstructors() { 00066 QMap<int, QStringList> candidates; 00067 candidates[0].append(QString::null); 00068 candidates[1].append(QString::fromLatin1("QByteArray*")); 00069 return candidates; 00070 } 00071 //@AQ_END_DEF_PUB_SLOTS@ 00072 }; 00073 00074 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00075 inline QByteArray AQSBuffer::buffer() const 00076 { 00077 AQ_CALL_RET_V(buffer(), QByteArray); 00078 } 00079 inline bool AQSBuffer::setBuffer(QByteArray *arg0) 00080 { 00081 AQ_CALL_RET_V(setBuffer(*arg0), bool); 00082 } 00083 inline bool AQSBuffer::setBuffer(AQSByteArray *arg0) 00084 { 00085 AQ_CALL_RET_V(setBuffer(*arg0), bool); 00086 } 00087 //@AQ_END_IMP_PUB_SLOTS@ 00088 00089 #endif /* AQSBUFFER_P_H_ */ 00090 // @AQSVOIDPTR@