Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSCompilerQSA_p.h 00003 ------------------- 00004 begin : 18/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 AQSCOMPILERQSA_P_H_ 00020 #define AQSCOMPILERQSA_P_H_ 00021 00022 #include "AQSByteArray_p.h" 00023 #include "AQObjects.h" 00024 00025 class AQSCompilerQSA : public AQSVoidPtr 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_VOID_AQOBJECT(CompilerQSA, VoidPtr); 00030 00031 protected: 00032 void specializedInternalFinish() { 00033 if (!wrap_) 00034 delete o_; 00035 } 00036 00037 public slots: 00038 QValueList<QVariant> errorLines() const { 00039 QVariantList ret; 00040 if (!o_) 00041 return ret; 00042 QValueList<int> l(o_->errorLines()); 00043 for (QValueList<int>::const_iterator it = l.begin(); it != l.end(); ++it) 00044 ret << *it; 00045 return ret; 00046 } 00047 00048 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00049 public slots: 00050 QByteArray byteCode(const QString &, int = 0, int = 0, bool = false); 00051 int errorType() const; 00052 QStringList errorMessages() const; 00053 QString code(QByteArray *); 00054 QString code(AQSByteArray *); 00055 00056 protected: 00057 static void *construct(const QSArgumentList &args) { 00058 QMap<int, QStringList> candidates; 00059 candidates[0].append(QString::null); 00060 QString sgt(castArgsSignature(args, candidates)); 00061 if (sgt.isEmpty()) 00062 return new AQCompilerQSA; 00063 return 0; 00064 } 00065 00066 public: 00067 static QMap<int, QStringList> candidateConstructors() { 00068 QMap<int, QStringList> candidates; 00069 candidates[0].append(QString::null); 00070 return candidates; 00071 } 00072 //@AQ_END_DEF_PUB_SLOTS@ 00073 }; 00074 00075 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00076 inline QByteArray AQSCompilerQSA::byteCode(const QString &arg0, int arg1, int arg2, bool arg3) 00077 { 00078 AQ_CALL_RET_V(byteCode(arg0, arg1, arg2, arg3), QByteArray); 00079 } 00080 inline int AQSCompilerQSA::errorType() const 00081 { 00082 AQ_CALL_RET_V(errorType(), int); 00083 } 00084 inline QStringList AQSCompilerQSA::errorMessages() const 00085 { 00086 AQ_CALL_RET_V(errorMessages(), QStringList); 00087 } 00088 inline QString AQSCompilerQSA::code(QByteArray *arg0) 00089 { 00090 AQ_CALL_RET_V(code(*arg0), QString); 00091 } 00092 inline QString AQSCompilerQSA::code(AQSByteArray *arg0) 00093 { 00094 AQ_CALL_RET_V(code(*arg0), QString); 00095 } 00096 //@AQ_END_IMP_PUB_SLOTS@ 00097 00098 #endif /* AQSCOMPILERQSA_P_H_ */ 00099 // @AQOBJECT_VOID@