Public Member Functions | Static Public Attributes | List of all members
ARCSConnection Class Reference

Describes a connection. More...

#include <arcsconnection.h>

Collaboration diagram for ARCSConnection:
Collaboration graph

Public Member Functions

 ARCSConnection ()
 
 ARCSConnection (const ARCSConnection &a)
 
 ARCSConnection (ARCSAbstractComponent *s, QString sgn, ARCSAbstractComponent *d, QString slt, bool q=false)
 Constructor creating a non empty connection. More...
 
void setSource (ARCSAbstractComponent *a)
 
void setDestination (ARCSAbstractComponent *a)
 
void setSlotName (QString s)
 
void setSignalName (QString s)
 
void setQueued (bool b)
 Tells wether the connection will be queued or not. More...
 
QList< QPointF > & getCoordinates ()
 
void setCoordinates (QList< QPointF > coords)
 
ARCSAbstractComponentgetSource ()
 
ARCSAbstractComponentgetDestination ()
 
QString getSourceName ()
 
QString getDestinationName ()
 
QString getSlotName ()
 
QString getSignalName ()
 
bool isQueued ()
 
bool connect ()
 Make the connection happen. More...
 
bool disconnect ()
 Disconnects the connection. More...
 
bool operator== (ARCSConnection c)
 
bool isComplete ()
 

Static Public Attributes

static ARCSConnection null = ARCSConnection()
 

Detailed Description

Describes a connection.

This class represents a connection between two components. It is also in charge of handling connections/desconnections.

Author
Jean-Yves Didier
Date
December, the 5th, 2008

Definition at line 46 of file arcsconnection.h.

Constructor & Destructor Documentation

ARCSConnection::ARCSConnection ( )

Constructor by default.

Definition at line 35 of file arcsconnection.cpp.

ARCSConnection::ARCSConnection ( const ARCSConnection a)

Copy constructor

Definition at line 44 of file arcsconnection.cpp.

ARCSConnection::ARCSConnection ( ARCSAbstractComponent s,
QString  sgn,
ARCSAbstractComponent d,
QString  slt,
bool  q = false 
)

Constructor creating a non empty connection.

Parameters
ssource component
sgnsignal name
ddestination component
sltslot name
qtells wether the connection is queued or not.

Definition at line 55 of file arcsconnection.cpp.

Member Function Documentation

bool ARCSConnection::connect ( )

Make the connection happen.

Returns
true if connection succeeded, false otherwise.

Definition at line 67 of file arcsconnection.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ARCSConnection::disconnect ( )

Disconnects the connection.

Returns
true if disconnection succeeded, false otherwise.

Definition at line 75 of file arcsconnection.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ARCSAbstractComponent* ARCSConnection::getDestination ( )
inline

Returns the destination of the connection

Definition at line 84 of file arcsconnection.h.

QString ARCSConnection::getSignalName ( )
inline

Returns the signal name of the connection

Definition at line 92 of file arcsconnection.h.

Here is the caller graph for this function:

QString ARCSConnection::getSlotName ( )
inline

Returns the slot name of the connection

Definition at line 90 of file arcsconnection.h.

Here is the caller graph for this function:

ARCSAbstractComponent* ARCSConnection::getSource ( )
inline

Returns the source of the connection

Definition at line 82 of file arcsconnection.h.

bool ARCSConnection::isQueued ( )
inline

Tells wether the connection is queued or not

Definition at line 94 of file arcsconnection.h.

Here is the caller graph for this function:

bool ARCSConnection::operator== ( ARCSConnection  c)
inline

comparison operator

Definition at line 106 of file arcsconnection.h.

void ARCSConnection::setDestination ( ARCSAbstractComponent a)
inline

Sets the destination component of the connection

Definition at line 65 of file arcsconnection.h.

void ARCSConnection::setQueued ( bool  b)
inline

Tells wether the connection will be queued or not.

When a connection is queued, parameters are given as events. It is sometimes useful when components are triggering each other in a loop since such behaviour might explode the function call stack.

Parameters
bConnection is queued when set to true

Definition at line 76 of file arcsconnection.h.

void ARCSConnection::setSignalName ( QString  s)
inline

Sets the signal name of the connection

Definition at line 69 of file arcsconnection.h.

void ARCSConnection::setSlotName ( QString  s)
inline

Sets the slot name of the connection

Definition at line 67 of file arcsconnection.h.

void ARCSConnection::setSource ( ARCSAbstractComponent a)
inline

Sets the source component of the connection

Definition at line 63 of file arcsconnection.h.


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