Public Member Functions | List of all members
ARCSQDynamicObject Class Referenceabstract

Interface to extend QObject functionnalities in order to make objects with dynamic signals or slots. More...

#include <arcsqdynamicobject.h>

Inheritance diagram for ARCSQDynamicObject:
Inheritance graph
Collaboration diagram for ARCSQDynamicObject:
Collaboration graph

Public Member Functions

virtual int qt_metacall (QMetaObject::Call call, int id, void **arguments)=0
 Method performing the actual callback task. More...
 
virtual QStringList getSignalList ()=0
 
virtual QStringList getSlotList ()=0
 
virtual int prepareSlotConnect (QString sigName, QString sltName, QString objectName, QString actualSignal, bool simulate=false)=0
 Prepares a connection with a slot which is belonging to this object. More...
 
virtual int prepareSignalConnect (QString sigName, QString sltName, QString objectName, QString actualSlot, bool simulate=false)=0
 Prepares a connection with a slot which does not belong to this object. More...
 
virtual int cleanSlotConnect (QString sigName, QString sltName, QString objectName, QString actualSignal)=0
 
virtual int cleanSignalConnect (QString signame, QString sltName, QString objectName, QString actualSlot)=0
 

Detailed Description

Interface to extend QObject functionnalities in order to make objects with dynamic signals or slots.

Usual QObjects do not have the ability to manage dynamic signals and slots (that is to say signals or slots dynamically added to QObjects). This interface is inheriting QObjects in order to ease the implementation of such QObjects so that customized QObjects can be used in the ARCS framework.

Each class should inherit this interface. Declaration should then look like this :

#include <arcs/arcsqdynamicobject.h>
class MyClass : public MyBase, public ARCSQDynamicObject
{
public:
virtual int qt_metacall(QMetaObject::Call call, int id, void ** arguments);
virtual QStringList getSignalList() ;
virtual QStringList getSlotList() ;
virtual int prepareSlotConnect(QString sigName, QString sltName, QString objectName = QString::null, QString actualSignal = QString::null, bool simulate = false) ;
virtual int prepareSignalConnect(QString sigName, QString sltName, QString objectName = QString::null, QString actualSlot = QString::null, bool simulate = false);
virtual int cleanSlotConnect(QString sigName, QString sltName, QString objectName, QString actualSignal);
virtual int cleanSignalConnect(QString sigName, QString sltName, QString objectName, QString actualSlot);
};

Where MyBase should inherit from QObject.

Author
Jean-Yves Didier
Date
September, the 23rd, 2009

Definition at line 62 of file arcsqdynamicobject.h.

Member Function Documentation

virtual int ARCSQDynamicObject::cleanSignalConnect ( QString  signame,
QString  sltName,
QString  objectName,
QString  actualSlot 
)
pure virtual

If a lot of things were required to prepare a signal connection, then the disconnection should also be implemented !

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

Here is the caller graph for this function:

virtual int ARCSQDynamicObject::cleanSlotConnect ( QString  sigName,
QString  sltName,
QString  objectName,
QString  actualSignal 
)
pure virtual

If a lot of things were required to prepare a slot connection, then the disconnection should also be implemented !

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

Here is the caller graph for this function:

virtual QStringList ARCSQDynamicObject::getSignalList ( )
pure virtual

Returns the list of signals implemented inside this component.

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

virtual QStringList ARCSQDynamicObject::getSlotList ( )
pure virtual

Returns the list of slots implemented inside this component.

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

virtual int ARCSQDynamicObject::prepareSignalConnect ( QString  sigName,
QString  sltName,
QString  objectName,
QString  actualSlot,
bool  simulate = false 
)
pure virtual

Prepares a connection with a slot which does not belong to this object.

This method has two purposes. First it should check wether the arguments of the given signals and slots are compatible. Second, it should set up what is needed in order to perform a clean connection and return the signal id.

Parameters
sigNamename and signature of the signal which belong to this object
sltNamename and signature of the slot which is triggered by the signal
objectNamename of the object which owns the slot.
simulateif true then the actual preparation is not performed, if false then everything is performed.
Returns
the id of the signal, -1 if it failed.

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

Here is the caller graph for this function:

virtual int ARCSQDynamicObject::prepareSlotConnect ( QString  sigName,
QString  sltName,
QString  objectName,
QString  actualSignal,
bool  simulate = false 
)
pure virtual

Prepares a connection with a slot which is belonging to this object.

This method has two purposes. First it should check wether the arguments of the given signals and slots are compatible. Second, it should set up what is needed in order to perform a clean connection and return the slot id.

Parameters
sigNamename and signature of the signal which should trigger the slot.
sltNamename and signature of the slot which is triggered
objectNamename of the object emitting the signal
simulateif true then the actual preparation is not performed, if false then everything is performed.
Returns
the id of the slot, -1 if it failed.

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

Here is the caller graph for this function:

virtual int ARCSQDynamicObject::qt_metacall ( QMetaObject::Call  call,
int  id,
void **  arguments 
)
pure virtual

Method performing the actual callback task.

This method is at the core of a QObject and is usually automatically created by moc Here the user has to reimplement it.

Parameters
callshould usually take the value QMetaObject::InvokeMetaMethod
idis the id of a slot or a signal given by indexOfSlot() or indexOfSignal()
argumentsarray of values (the first pointer is usually for the return value.
Returns
-1 when the call has been performed.

Implemented in ARCSGeneralLogger, ARCSSensorLogger, ARCSScriptQObjectProxy, and ARCSConstantModifier.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: