MembershipInitializer.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef MEMBERSHIPINITIALIZER_H
  2. #define MEMBERSHIPINITIALIZER_H
  3. #include<Common/GraphType.h>
  4. #include<Common/BoostGraphWrapper.h>
  5. #include <HierarchicalLayoutGenerator/HierarchicalLayouter.h>
  6. #include <Common/LayoutEnum.h>
  7. /**
  8. * @brief The MembershipInitializer class
  9. *
  10. * The class provides helpers to manage membership relation between subgraphs and their innet elements.
  11. */
  12. class GRAPHLAYOUTLIBRARYSHARED_EXPORT MembershipInitializer
  13. {
  14. public:
  15. QMap<int,SubGraph*> m_MapSubgraphsId; /*!< Map of subgraphs and their IDs */
  16. /** @name Creators
  17. * The methods under this section are responsible for constructing
  18. * an instance of type MembershipInitializer.
  19. */
  20. //@{
  21. MembershipInitializer();
  22. //@}
  23. /** @name Modifiers
  24. * The methods under this section are responsible for modifying
  25. * an instance of MembershipInitializer.
  26. */
  27. //@{
  28. /** Assigns clusterId's and VertexIds in subgraph and graphs
  29. @pre
  30. -# mainGraphref != NULL
  31. @param mainGraphref
  32. reference to graph
  33. @return none
  34. @throw boost graph exception
  35. */
  36. void initializeMembers(SubGraph& mainGraphref);
  37. //@}
  38. /** @name Queries
  39. * The methods under this section are responsible for accessing
  40. * an instance of type MembershipInitializer.
  41. */
  42. //@{
  43. /** Create clusterId's and pointer to subgraph.
  44. @pre
  45. -# mainGraphref != NULL
  46. @param none
  47. @return m_MapSubgraphsId
  48. map to subgraph id and pointers
  49. @throw boost graph exception
  50. */
  51. QMap<int,SubGraph*> getIdToSubgraphMap();
  52. //@}
  53. };
  54. #endif // MEMBERSHIPINITIALIZER_H