]> AND Private Git Repository - blast.git/blobdiff - AbstractInterface.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
added impl xsd + patterns in impls
[blast.git] / AbstractInterface.cpp
index 25cd2d3b284789e8e1ba7d7da932a5295f883555..e651f583583e507f0b198288088bcd629114e909 100644 (file)
@@ -8,23 +8,18 @@ AbstractInterface::AbstractInterface(AbstractBlock* _owner) {
   name = "";
   width = "1";
   direction = Input;
   name = "";
   width = "1";
   direction = Input;
-  purpose = Data;
-  level = Basic;
+  purpose = Data;  
   type = Boolean;
 
 }
 
   type = Boolean;
 
 }
 
-AbstractInterface::AbstractInterface(AbstractBlock* _owner, const QString& _name, const QString& _type, const QString& _width, int _direction, int _purpose, int _level) {
+AbstractInterface::AbstractInterface(AbstractBlock* _owner, const QString& _name, const QString& _type, const QString& _width, int _direction, int _purpose) {
 
   owner = _owner;  
   name = _name;
   width = _width;
   direction = _direction;
   purpose = _purpose;
 
   owner = _owner;  
   name = _name;
   width = _width;
   direction = _direction;
   purpose = _purpose;
-  level = _level;
-  if (direction == InOut) {
-    level = Top;
-  }
   type = typeFromString(_type);
 }
 
   type = typeFromString(_type);
 }
 
@@ -35,7 +30,6 @@ AbstractInterface::AbstractInterface(AbstractInterface* other) {
   width = other->width;
   direction = other->direction;
   purpose = other->purpose;
   width = other->width;
   direction = other->direction;
   purpose = other->purpose;
-  level = other->level;
 }
 
 AbstractInterface::~AbstractInterface() {
 }
 
 AbstractInterface::~AbstractInterface() {
@@ -89,19 +83,6 @@ QString AbstractInterface::getDirectionString() {
     return str;
 }
 
     return str;
 }
 
-QString AbstractInterface::getLevelString() {
-    QString str;
-    switch(level){
-        case AbstractInterface::Basic:
-            str = QString("basic");
-            break;
-        case AbstractInterface::Top:
-            str = QString("top");
-            break;
-    }
-    return str;
-}
-
 double AbstractInterface::getDoubleWidth() throw(QException) {
 
   static QString fctName = "AbstractInterface::getDoubleWidth()";
 double AbstractInterface::getDoubleWidth() throw(QException) {
 
   static QString fctName = "AbstractInterface::getDoubleWidth()";
@@ -143,36 +124,16 @@ void AbstractInterface::setDirection(int _direction) {
   if ((_direction > Input) && (_direction <= InOut)) {
     direction = _direction;
   }
   if ((_direction > Input) && (_direction <= InOut)) {
     direction = _direction;
   }
-  if (direction == InOut) {
-    level = Top;
-  }
-}
-
-void AbstractInterface::setLevel(int _level) {
-  if ((_level >= Basic) << (_level < Top)) {
-    level = _level;
-  }
-  if (direction == InOut) {
-    level = Top;
-  }
 }
 
 
 }
 
 
-
-int AbstractInterface::getIntDirection(QString str)
-{
+int AbstractInterface::getIntDirection(QString str) {
     if(str == "input") return Input;
     if(str == "output") return Output;
     if(str == "inOut") return InOut;
     return -1;
 }
 
     if(str == "input") return Input;
     if(str == "output") return Output;
     if(str == "inOut") return InOut;
     return -1;
 }
 
-int AbstractInterface::getIntLevel(QString str)
-{
-    if(str == "basic") return Basic;
-    if(str == "top") return Top;
-    return -1;
-}
 
 QString AbstractInterface::getTypeString() {
 
 
 QString AbstractInterface::getTypeString() {