Frapper  1.0a
Public Types | Signals | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Frapper::Connection Class Reference

Class representing connections between nodes (or rather between parameters of nodes). More...

#include <Connection.h>

Inheritance diagram for Frapper::Connection:
Inheritance graph
[legend]
Collaboration diagram for Frapper::Connection:
Collaboration graph
[legend]

Public Types

typedef unsigned int ID
 Type definition for a connection's identifier.
 
typedef QMap< ID, Connection * > Map
 Type definition for a map of connections with connection ID's as keys.
 

Signals

void destroyed (Connection *connection)
 Signal that is emitted when the connection is being destroyed.
 

Public Member Functions

 Connection (Parameter *sourceParameter, Parameter *targetParameter)
 Constructor of the Connection class.
 
 ~Connection ()
 Destructor of the Connection class.
 
ID getId () const
 Returns the connection's ID.
 
bool hasSource () const
 Returns whether this connection is connected to an output parameter of a source node.
 
ParametergetSourceParameter () const
 Returns the source parameter that this connection is connected to.
 
void setSourceParameter (Parameter *sourceParameter)
 Sets the source parameter that this connection should be connected to.
 
bool hasTarget () const
 Returns whether this connection is connected to an input parameter of a target node.
 
ParametergetTargetParameter () const
 Returns the target parameter that this connection is connected to.
 
void setTargetParameter (Parameter *targetParameter)
 Sets the target parameter that this connection should be connected to.
 

Private Member Functions

void updateName ()
 Updates the name of the connection according to its source and target parameters.
 

Private Attributes

ID m_id
 The ID of the connection.
 
Parameterm_sourceParameter
 The parameter of the source node that this connection is connected to.
 
Parameterm_targetParameter
 The parameter of the target node that this connection is connected to.
 

Static Private Attributes

static ID s_currentId = 0
 The ID to give to the connection that is created next.
 

Detailed Description

Class representing connections between nodes (or rather between parameters of nodes).

Member Typedef Documentation

typedef unsigned int Frapper::Connection::ID

Type definition for a connection's identifier.

Type definition for a map of connections with connection ID's as keys.

Constructor & Destructor Documentation

Frapper::Connection::Connection ( Parameter sourceParameter,
Parameter targetParameter 
)

Constructor of the Connection class.

Public Constructors.

Parameters
sourceParameterThe parameter of the source node that this connection is connected to.
targetParameterThe parameter of the target node that this connection is connected to.

Constructor of the Connection class.

Parameters
sourceParameterThe parameter of the source node that this connection is connected to.
targetParameterThe parameter of the target node that this connection is connected to.
Frapper::Connection::~Connection ( )

Destructor of the Connection class.

Member Function Documentation

Connection::ID Frapper::Connection::getId ( ) const

Returns the connection's ID.

Public Functions.

Returns
The connection's ID.

Returns the connection's ID.

Returns
The connection's ID.
bool Frapper::Connection::hasSource ( ) const

Returns whether this connection is connected to an output parameter of a source node.

Returns whether this connection is connected to an output parameter.

Returns
True if this connection is connected to an output parameter, otherwise False.
Parameter * Frapper::Connection::getSourceParameter ( ) const

Returns the source parameter that this connection is connected to.

Returns
The source parameter that this connection is connected to.
void Frapper::Connection::setSourceParameter ( Parameter sourceParameter)

Sets the source parameter that this connection should be connected to.

Parameters
sourceParameterThe source parameter that this connection should be connected to.
bool Frapper::Connection::hasTarget ( ) const

Returns whether this connection is connected to an input parameter of a target node.

Returns
True if this connection is connected to an input parameter, otherwise False.
Parameter * Frapper::Connection::getTargetParameter ( ) const

Returns the target parameter that this connection is connected to.

Returns
The target parameter that this connection is connected to.
void Frapper::Connection::setTargetParameter ( Parameter targetParameter)

Sets the target parameter that this connection should be connected to.

Parameters
targetParameterThe target parameter that this connection should be connected to.
void Frapper::Connection::destroyed ( Connection connection)
signal

Signal that is emitted when the connection is being destroyed.

void Frapper::Connection::updateName ( )
private

Updates the name of the connection according to its source and target parameters.

Private Functions.

Member Data Documentation

Connection::ID Frapper::Connection::s_currentId = 0
staticprivate

The ID to give to the connection that is created next.

Private Static Data.

The ID to give to the Connection that is created next.

ID Frapper::Connection::m_id
private

The ID of the connection.

Parameter* Frapper::Connection::m_sourceParameter
private

The parameter of the source node that this connection is connected to.

Parameter* Frapper::Connection::m_targetParameter
private

The parameter of the target node that this connection is connected to.


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