X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/18fecf25efe710631fabecbb9f689c2997fdfe18..2bdaa0aa3fab52f0808f60d9bbdabcd56d0efae9:/BlockImplementation.h diff --git a/BlockImplementation.h b/BlockImplementation.h index fb9c77c..a9a5249 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,40 +35,40 @@ public: inline QHash getConsumptionPattern() { return consumptionPattern; } inline QHash getProductionPattern() { return productionPattern; } inline QString getProductionCounter() { return productionCounter; } + inline QList getResources() { return resources; } + // 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; } - QString eval(QString line, QTextStream& out); - QString evalComplex(QString line, int num); - QString evalString(QString s); - QList* evalStringComplex(QString s); - QString evalValue(QString s); - QString calculateWidth(QString s); + // testers + + inline bool hasNoPatterns() { return noPatterns; } inline void setReference(ReferenceBlock* _reference) { reference = _reference; } void loadPatterns(QDomElement &root) throw(Exception); bool checkPatterns(); - + inline void addResource(QString file) { resources.append(file); } private: QString xmlFile; QString referenceXml; QString referenceMd5; - QString nameEnt, line; + + QList resources; + 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 - QString productionCounter; - - QString getIfaceUserName(AbstractInterface* refIface); // get the name of an interface given by the user, from the reference interface + QString productionCounter; friend QDataStream &operator<<(QDataStream &out, const BlockImplementation &impl); friend QDataStream &operator>>(QDataStream &in, BlockImplementation &impl);