X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/60c13e8b4c7ea3d595969c1e7c0a28b068a17ca6..3fb762e7042d9b4a1cf78556ad9ed7f117cc53ba:/Graph.h diff --git a/Graph.h b/Graph.h index 58690c9..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); @@ -44,6 +49,8 @@ public: 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 @@ -63,6 +70,7 @@ private: GroupBlock* topGroup; QList groups; //! usefull to avoid recursive methods to find a particular group. QList stimulis; //! source for the top group + QList clocks; // clocks[0] is the main clock. };