1 #include "ReferenceInterface.h"
2 #include "AbstractBlock.h"
4 ReferenceInterface::ReferenceInterface(AbstractBlock* _owner) throw(Exception) : AbstractInterface(_owner) {
5 if (_owner->isReferenceBlock()) throw(Exception(BLOCK_INVALID_TYPE));
9 ReferenceInterface::ReferenceInterface(AbstractBlock* _owner,
10 const QString& _name, const QString&_type,
11 const QString& _width,
15 throw (Exception) : AbstractInterface(_owner, _name, _type, _width, _direction, _purpose) {
17 if (_owner->isReferenceBlock()) throw(Exception(BLOCK_INVALID_TYPE));
19 multiplicity = _multiplicity;
20 if (direction == InOut) {
25 bool ReferenceInterface::isReferenceInterface() {
29 void ReferenceInterface::setMultiplicity(int _multiplicity) {
30 if (direction == InOut) {
34 multiplicity = _multiplicity;
38 int ReferenceInterface::translatePurpose(const QString& txt) {
42 else if (txt == "reset") {
51 int ReferenceInterface::translateMultiplicity(const QString& txt) {
58 mult = txt.toInt(&ok);