X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/18fecf25efe710631fabecbb9f689c2997fdfe18..9bfa0c13066918f440ac2b5461fb3f8847f43fd6:/BlockImplementation.h diff --git a/BlockImplementation.h b/BlockImplementation.h index fb9c77c..72776e3 100644 --- a/BlockImplementation.h +++ b/BlockImplementation.h @@ -17,7 +17,6 @@ class ArithmeticEvaluator; #include "Exception.h" class Exception; - using namespace std; using namespace Qt; @@ -36,12 +35,17 @@ public: inline QHash getConsumptionPattern() { return consumptionPattern; } inline QHash getProductionPattern() { return productionPattern; } inline QString getProductionCounter() { return productionCounter; } + // setters inline void setDelta(QString _delta) { delta = _delta; } inline void setConsumptionPattern(QHash pattern) { consumptionPattern = pattern; } inline void setProductionPattern(QHash pattern) { productionPattern = pattern; } inline void setProductionCounter(QString pattern) { productionCounter = pattern; } + // testers + + inline bool hasNoPatterns() { return noPatterns; } + QString eval(QString line, QTextStream& out); QString evalComplex(QString line, int num); QString evalString(QString s); @@ -54,16 +58,19 @@ public: void loadPatterns(QDomElement &root) throw(Exception); bool checkPatterns(); - + inline void addSource(QString file) { sources.append(file); } private: QString xmlFile; QString referenceXml; QString referenceMd5; - QString nameEnt, line; + + QList sources; + QMap paramMap; ArithmeticEvaluator* evaluator; ReferenceBlock* reference; FunctionalBlock* block; // the current functional block for which this implementation is used. + bool noPatterns; QString delta; QHash consumptionPattern; // key = reference interface name, value = pattern expression QHash productionPattern; // key = reference interface name, value = pattern expression