X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/84eeae848c9d322ea4c935b8ec7338f69becbc10..56f7c4239666506c59af42885f0bf0141d21a614:/FunctionalBlock.h?ds=sidebyside

diff --git a/FunctionalBlock.h b/FunctionalBlock.h
index f27bef6..b3cfbc4 100644
--- a/FunctionalBlock.h
+++ b/FunctionalBlock.h
@@ -27,7 +27,7 @@ class FunctionalBlock : public AbstractBlock {
 public:
 
   FunctionalBlock(GroupBlock* _parent, ReferenceBlock* _reference) throw(Exception);
-
+  ~FunctionalBlock();
   // getters
   inline ReferenceBlock* getReference() { return reference; }
   inline QList<int> getProductionCounter() { return productionCounter; }
@@ -56,26 +56,26 @@ public:
   QString getReferenceHashMd5();
   
   // patterns
-  bool createPatterns(); // called in Graph, before checking compatibility and computing output pattern
-  bool checkInputPatternCompatibility();
-  bool computeOutputPattern(int nbExec = -1);
+  void createPatterns() throw(Exception); // called in Graph, before checking compatibility and computing output pattern
+  void checkInputPatternCompatibility() throw(Exception);
+  void computeOutputPattern(int nbExec = -1) throw(Exception);
   
 private:  
   // patterns
-  bool createDelta();
-  bool createConsumptionPattern(); // initialize a QList<char> for each interface from patterns defined in implementation
-  bool createProductionPattern(); // initialize a QList<char> for each interface from patterns defined in implementation
-  bool createProductionCounter(); // initialize a QList<int> from counter defined in implementation
-  bool createAdmittance(int nbExec); // initialize a QList<char> from consumption pattern and delta
+  void createDelta() throw(Exception);
+  void createConsumptionPattern() throw(Exception); // initialize a QList<char> for each interface from patterns defined in implementation
+  void createProductionPattern() throw(Exception); // initialize a QList<char> for each interface from patterns defined in implementation
+  void createProductionCounter() throw(Exception); // initialize a QList<int> from counter defined in implementation
+  void createAdmittance(int nbExec) throw(Exception); // initialize a QList<char> from consumption pattern and delta
   void clearConsumptionPattern();
   void clearProductionPattern();
-  void createInputPattern();
+  void createInputPattern() throw(Exception);
   void clearInputPattern();
-  int getNumberOfExecution(); // compute number of block execution from inputPattern and delta
+  int createTriggers(); // compute the clock cycle at which the block is triggered
   
-  double evaluateExpression(const QString& expression, bool* ok);
-  QList<char>* expandPattern(const QString& patternIn, bool* ok);
-  void expandPatternRecur(const QString& patternIn, int* offset, bool* ok, QList<char> *patternOut);
+  double evaluateExpression(const QString& expression) throw(Exception);
+  QList<char>* expandPattern(const QString& patternIn) throw(Exception);
+  QList<char> expandPatternRecur(const QString& patternIn, int* offset)  throw(Exception);
   /*!
    * \brief samePatterns
    * \param patternSrc the pattern that must be tested with patternDest (is patternDest == patternDest)  
@@ -151,7 +151,8 @@ private:
   QMap<AbstractInterface*, QList<char>* > productionPattern;
   QMap<AbstractInterface*,QList<char>* > inputPattern;
   QMap<AbstractInterface*, QList<char>* > outputPattern; // CAUTION: the QList<char>* must also be stored in the outputPattern attributes of AbstractInterface
-  QList<int> productionCounter; //! only usefull for control output interfaces
+  QList<int> productionCounter; // only usefull for control output interfaces
+  QList<int> triggers; // the clock cycles at which the block is triggered, taking into account IP
   int lengthIP; // for convenience, set in createInputPattern()
   int lengthCP; // for convenience, set in createConsumptionPattern()
   int lengthAP; // for convenience, set in createAdmittance()