1 #ifndef __FUNCTIONALINTERFACE_H__
\r
2 #define __FUNCTIONALINTERFACE_H__
\r
9 #include "ConnectedInterface.h"
\r
10 class ReferenceInterface;
\r
12 #include "Exception.h"
\r
14 using namespace std;
\r
20 - A FunctionalInterface instance can be obtained by:
\r
21 - cloning an existing ReferenceInterface when a new functionalBlock is created by cloning a ReferenceBlock
\r
22 - cloning an existing FunctionalInterface when its reference has a multiplicity > 1
\r
24 - For an Input, the list connectedFrom can contain ONLY ONE element
\r
25 - For an Output, the list connectedTo can contain several element
\r
26 - If connectedTo contains something, then connectedFrom is NULL
\r
27 - If connectedFrom contains something, the connectedTo is empty.
\r
30 class FunctionalInterface : public ConnectedInterface {
\r
33 FunctionalInterface();
\r
34 FunctionalInterface(AbstractBlock* _owner, ReferenceInterface* _reference) throw(Exception); // create a default interface (see AbstractInterface)
\r
37 inline ReferenceInterface* getReference() { return reference; }
\r
38 int getClockDomain() throw(Exception); // determine at which freq. is synchronized iface
\r
39 //inline QList<char>* getConsumptionPattern() { return consumptionPattern; }
\r
40 //inline QList<char>* getProductionPattern() { return productionPattern; }
\r
43 //inline void setConsumptionPattern(QList<char>* pattern) { consumptionPattern = pattern; }
\r
44 //inline void setProductionPattern(QList<char>* pattern) { productionPattern = pattern; }
\r
47 bool isFunctionalInterface();
\r
48 bool canConnectTo(AbstractInterface* iface);
\r
49 bool canConnectFrom(AbstractInterface* iface);
\r
53 AbstractInterface* clone();
\r
55 void connectionsValidation(QStack<AbstractInterface*> *interfacetoValidate, QList<AbstractInterface*> *validatedInterfaces) throw(Exception);
\r
56 int getInterfaceMultiplicity();
\r
60 ReferenceInterface* reference;
\r
63 //QList<char>* consumptionPattern; //! only usefull for input interfaces
\r
64 //QList<char>* productionPattern; //! only usefull for output interfaces
\r
65 //QString admittance; //! only usefull for input interfaces
\r
68 #endif // __FUNCTIONALINTERFACE_H__
\r