Eneboo - Documentación para desarrolladores
src/qsa/src/engine/qsreference.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qsreference.h  1.1.5   edited 2006-12-05T14:19:25$
00003 **
00004 ** Copyright (C) 2001-2006 Trolltech AS.  All rights reserved.
00005 **
00006 ** This file is part of the Qt Script for Applications framework (QSA).
00007 **
00008 ** This file may be distributed and/or modified under the terms of the
00009 ** GNU General Public License version 2 as published by the Free Software
00010 ** Foundation and appearing in the file LICENSE.GPL included in the
00011 ** packaging of this file.
00012 **
00013 ** Licensees holding a valid Qt Script for Applications license may use
00014 ** this file in accordance with the Qt Script for Applications License
00015 ** Agreement provided with the Software.
00016 **
00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00019 **
00020 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00021 **   information about QSA Commercial License Agreements.
00022 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00023 **
00024 ** Contact info@trolltech.com if any conditions of this licensing are
00025 ** not clear to you.
00026 **
00027 *****************************************************************************/
00028 
00029 #ifndef QSREFERENCE_H
00030 #define QSREFERENCE_H
00031 
00032 #include "qsobject.h"
00033 #include "qsclass.h"
00034 
00035 class QSReference
00036 {
00037 public:
00038   QSReference() : cls(0) { }
00039   QSReference(const QSObject &b, const QSMember &m, const QSClass *c)
00040     : bs(b), mem(m), cls(c) { }
00041   QSReference(const QSObject &b) : bs(b), cls(0) { }
00042 
00043   bool isWritable() const {
00044     return isReference() && mem.isWritable();
00045   }
00046   bool isDefined() const {
00047     return isReference() && mem.isDefined();
00048   }
00049   bool isReference() const {
00050     return cls != 0;
00051   }
00052   QSObject base() const {
00053     return bs;
00054   }
00055   QSMember member() const {
00056     return mem;
00057   }
00058   //     void setBase( const QSObject &b ) { bs = b; }
00059   void setIdentifier(const QString &i) {
00060     ident = i;
00061   }
00062   QString identifier() const {
00063     return ident;
00064   }
00065   QSObject dereference() const;
00066   void assign(const QSObject &o);
00067   bool deleteProperty();
00068 
00069 private:
00070   QSObject bs;
00071   QSMember mem;
00072   const QSClass *cls;
00073   QString ident;
00074 };
00075 
00076 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'