Public Member Functions | Protected Member Functions | List of all members
ARCSProxyComponent Class Reference

Component linking. More...

#include <arcsproxycomponent.h>

Inheritance diagram for ARCSProxyComponent:
Inheritance graph
Collaboration diagram for ARCSProxyComponent:
Collaboration graph

Public Member Functions

void setContext (ARCSContext *ctx)
 
ARCSContextgetContext ()
 
virtual QString toString ()
 Defines a basic seralization mechanism. More...
 
virtual bool parseString (QString s)
 Defines a basic seralization mechanism. More...
 
virtual QStringList getSignals ()
 Returns the names of the availables signals.
 
virtual QStringList getSlots ()
 Returns the names of the available slots.
 
- Public Member Functions inherited from ARCSAbstractComponent
bool instanciate ()
 Instanciates the real component.
 
bool isInstanciated ()
 Determines wether the component is instanciated or not.
 
void destroy ()
 Destroys the real component.
 
ARCSAbstractComponentclone ()
 Kage bunshin no jutsu ! More...
 
virtual bool connect (QString sig, ARCSAbstractComponent *dst, QString slt, bool queued=false)
 This method connects two components by the indicated signals and slots. More...
 
bool disconnect (QString sig, ARCSAbstractComponent *dst, QString slt)
 This method disconnects two components by the indicated signals and slots. More...
 
bool init (QString slt, QVariant *var)
 Initializes a component. More...
 
virtual bool loadFile (QString fn)
 Defines a way to load a component description from a file. More...
 
virtual bool saveFile (QString fn)
 Defines a way to save a component description inside a file. More...
 
void setProperty (QString name, QVariant value)
 Sets a meta-property on this component. More...
 
QVariant getProperty (QString name)
 Gets a meta-property from this component. More...
 
void removeProperty (QString name)
 Removes a meta-property from this component. More...
 
void resetProperties ()
 Sets the property list to a blank list.
 
QStringList getProperties ()
 
void setFamily (QString s)
 
QString getFamily ()
 
void setType (QString s)
 
QString getType ()
 
virtual QVariant getGenuineComponentInstance ()
 

Protected Member Functions

virtual void getProxySlot (QString slot, ObjectList &obj, QStringList &proxySlot)
 Creates a proxy slot to interface a component to native ARCS components. More...
 
virtual void getProxySignal (QString signal, ObjectList &obj, QStringList &proxySignal)
 Creates a proxy signal to interface a component to native ARCS components. More...
 
virtual bool genuineConnect (QString sig, ARCSAbstractComponent *dst, QString slt, bool queued=false)
 This method connects two components by the indicated signals and slots. More...
 
virtual bool genuineDisconnect (QString sig, ARCSAbstractComponent *dst, QString slt)
 This method disconnects two components by the indicated signals and slots. More...
 
virtual bool genuineInstanciate ()
 This method should implement the instanciation of the actual component. More...
 
virtual void genuineDestroy ()
 This method should implement the destruction of the actual component. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from ARCSAbstractComponent
static void getProxySlot (ARCSAbstractComponent *cmp, QString slot, ObjectList &obj, QStringList &proxySlot)
 Wrapper for getProxySlot()
 
static void getProxySignal (ARCSAbstractComponent *cmp, QString signal, ObjectList &obj, QStringList &proxySignal)
 Wrapper for getProxySignal()
 
- Static Protected Attributes inherited from ARCSAbstractComponent
static const QString slotPrefix = "1"
 
static const QString signalPrefix = "2"
 

Detailed Description

Component linking.

This component acts as a proxy for another component.

Author
Jean-Yves Didier
Date
April, the 7th, 2009

Definition at line 42 of file arcsproxycomponent.h.

Member Function Documentation

virtual bool ARCSProxyComponent::genuineConnect ( QString  ,
ARCSAbstractComponent ,
QString  ,
bool  = false 
)
inlineprotectedvirtual

This method connects two components by the indicated signals and slots.

In order to lessen the burden of managing connections between components of the same family, this method should implement a direct connection between them.

Parameters
sigthe signal name of the current component
dsta pointer to the component to connect to
sltthe slot name of the component to connect to
queuedif set to false the parameter transmission will not be delayed.
Returns
true if direct connection has been performed, false otherwise.

Reimplemented from ARCSAbstractComponent.

Definition at line 83 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual void ARCSProxyComponent::genuineDestroy ( )
inlineprotectedvirtual

This method should implement the destruction of the actual component.

Should be overloaded by each subclasses.

Implements ARCSAbstractComponent.

Definition at line 104 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual bool ARCSProxyComponent::genuineDisconnect ( QString  ,
ARCSAbstractComponent ,
QString   
)
inlineprotectedvirtual

This method disconnects two components by the indicated signals and slots.

In order to lessen the burden of managing connections between components of the same family, this method should implement a direct disconnection between them.

Parameters
sigthe signal name of the current component
dsta pointer to the component to connect to
sltthe slot name of the component to connect to
Returns
true if direct connection has been performed, false otherwise.

Reimplemented from ARCSAbstractComponent.

Definition at line 90 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual bool ARCSProxyComponent::genuineInstanciate ( )
inlineprotectedvirtual

This method should implement the instanciation of the actual component.

Should be overloaded by each subclasses.

Implements ARCSAbstractComponent.

Definition at line 97 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual void ARCSProxyComponent::getProxySignal ( QString  signal,
ObjectList &  obj,
QStringList &  proxySignal 
)
inlineprotectedvirtual

Creates a proxy signal to interface a component to native ARCS components.

This function should be overriden by subclasses. It is used in the case the abstracted component is not from the same family as another component to connect to. In this case, the abstracted component should offer a wrapper using a QObject to communicate with other components as if it was a native component of the ARCS runtime.

Parameters
sigthe signal name of the current component
obja list of QObject wrappers returned by this method
proxySignalthe list of the real slot names associated to the QObjects returned by this method.

Implements ARCSAbstractComponent.

Definition at line 81 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual void ARCSProxyComponent::getProxySlot ( QString  slot,
ObjectList &  obj,
QStringList &  proxySlot 
)
inlineprotectedvirtual

Creates a proxy slot to interface a component to native ARCS components.

This function should be overriden by subclasses. It is used in the case the abstracted component is not from the same family as another component to connect to. In this case, the abstracted component should offer a wrapper using a QObject to communicate with other components as if it was a native component of the ARCS runtime.

Parameters
slotthe slot name of the current component
obja list of QObject wrappers returned by this method
proxySlotthe list of the real slot names associated to the QObjects returned by this method.

Implements ARCSAbstractComponent.

Definition at line 79 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual bool ARCSProxyComponent::parseString ( QString  s)
inlinevirtual

Defines a basic seralization mechanism.

This should parse a string and affect the internal representation of the component.

Returns
true if parsing was a success, false otherwise.

Implements ARCSAbstractComponent.

Definition at line 52 of file arcsproxycomponent.h.

Here is the call graph for this function:

virtual QString ARCSProxyComponent::toString ( )
inlinevirtual

Defines a basic seralization mechanism.

This should return a string representation of the component.

Implements ARCSAbstractComponent.

Definition at line 51 of file arcsproxycomponent.h.


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