Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos públicos estáticos
Referencia de la Clase AQSObjectFactory

#include <AQSObjectFactory.h>

Diagrama de herencias de AQSObjectFactory

Lista de todos los miembros.

Métodos públicos

 AQSObjectFactory ()
 ~AQSObjectFactory ()
QObjectcreate (const QString &className, const QSArgumentList &arguments, QObject *context)

Métodos públicos estáticos

static QObjectstaticCreate (const QString &className, const QSArgumentList &arguments, QObject *context, QMap< int, QStringList > *candidateCtors=0)

Documentación del constructor y destructor

AQSObjectFactory::AQSObjectFactory ( )
AQSObjectFactory::~AQSObjectFactory ( )

Documentación de las funciones miembro

QObject * AQSObjectFactory::create ( const QString className,
const QSArgumentList arguments,
QObject context 
) [virtual]

This virtual function should be reimplemented in your QSObjectFactory subclass when you want to instantiate objects from script. The subclass can be used to create any number of different classes. The name of the required class is passed in the className argument, and the arguments to be passed to that class's constructor are passed in the arguments list. See QSArgument for further information about the arguments. context is the script QObject context in which the class has been instantiated, or 0 if the class has not been instantiated in a QObject context.

Only QObject subclasses may be created in this way. This function returns an instance of the requested class.

This function is called by the scripting engine, e.g. when it encounters code similar to the following:

    var x = new ACppObject( arg1, arg2 ); // Qt Script

The classes that a particular QSObjectFactory instance is capable of instantiating is returned by classes().

If the arguments are invalid or any other invalid operation happens, you can use throwError() to issue a Qt Script error.

All objects created from this function are deleted by the engine when the engine registers it as not being referenced anymore, unless the object at this time has a parent, which will then be responsible for ownership.

Reimplementado de QSObjectFactory.

QObject * AQSObjectFactory::staticCreate ( const QString className,
const QSArgumentList arguments,
QObject context,
QMap< int, QStringList > *  candidateCtors = 0 
) [static]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'