X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/1b7818e18ed7bcf3464e307b97c6e0e6d72cc69b..a13795fc34cd1e74f94695d35253c3d00abec9bc:/Graph.h diff --git a/Graph.h b/Graph.h index a9b90aa..d5b15a9 100644 --- a/Graph.h +++ b/Graph.h @@ -19,13 +19,18 @@ using namespace Qt; class Graph { public: - Graph(bool createTopGroupIface = true); + Graph(); ~Graph(); // getters inline GroupBlock* getTopGroup() { return topGroup; } inline QList getAllGroups() { return groups; } + inline double getClock(int id) { return clocks.at(id); } + inline QList& getClocks() { return clocks; } + //setters + inline void resetClocks() { clocks.clear(); } + // methods for group blocks GroupBlock* createChildGroupBlock(GroupBlock* parent, bool createGroupIface = true); void removeGroupBlock(GroupBlock *group); @@ -37,13 +42,15 @@ public: bool removeFunctionalBlock(FunctionalBlock* block); FunctionalBlock* getFunctionalBlockByName(QString name, GroupBlock* parent = NULL); //! if parent = NULL, search in the whole graph - // methods for source blocks - FunctionalBlock* createSourceBlock(ReferenceBlock *ref, bool createIfaces = true); - FunctionalBlock* duplicateSourceBlock(FunctionalBlock *block); - FunctionalBlock* getSourceBlockByName(QString name); - bool removeSourceBlock(FunctionalBlock* block); + // methods for stimulis blocks + FunctionalBlock* createStimuliBlock(ReferenceBlock *ref, bool createIfaces = true); + FunctionalBlock* duplicateStimuliBlock(FunctionalBlock *block); + FunctionalBlock* getStimuliBlockByName(QString name); + bool removeStimuliBlock(FunctionalBlock* block); // others + void createTopGroup(bool createTopGroupIfaces = true); + inline void addClock(double freq) { clocks.append(freq); } QList getOutsideInterfaces(); QList getExternalResources(); // returns the list of all external files needed for VHDL generation @@ -62,7 +69,8 @@ public: private: GroupBlock* topGroup; QList groups; //! usefull to avoid recursive methods to find a particular group. - QList sources; //! source for the top group + QList stimulis; //! source for the top group + QList clocks; // clocks[0] is the main clock. };