123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- #ifndef LAYERNODE_H
- #define LAYERNODE_H
- #include <Common/GraphType.h>
- #include <HierarchicalLayoutGenerator/NestingTreeSubgraphNode.h>
- #include <QMultiMap>
- class NestingTreeSubgraphNode;
- /**
- * @brief The LayerNode class
- *
- * The class provides helpers to manage layer node in hierarchical layout.
- */
- class GRAPHLAYOUTLIBRARYSHARED_EXPORT LayerNode
- {
- private:
- /*! Every layer node should have link to
- * its parent node; it is useful Splitting Long Edges */
- NestingTreeSubgraphNode *m_parentNestingTreeSubgraphNode;
- /*! All properties are to be accessed using this Global Vertex Descriptor
- * and main graph */
- VertexDescriptor m_vGlobalVertex;
- /*! iTopological Order according to subgraph ordering graph */
- int m_iTopologocalOrder;
- /*! Vertex descriptor from Subgraph Ordering Graph */
- int m_iSubgraphOrderingGraphVertexIndex;
- public:
- /** @name Creators
- * The methods under this section are responsible for constructing
- * an instance of type LayerNode.
- */
- //@{
- /**
- Constructs new object of type LayerNode.
- @pre none
- @param none
- @return none
- @throw none
- */
- LayerNode();
- /**
- Constructs new object of type LayerNode.
- @pre none
- @param vGlobalVertex
- instance of VertexDescriptor
- @return none
- @throw none
- */
- LayerNode(VertexDescriptor vGlobalVertex);
- /**
- Constructs new object of type LayerNode.
- @pre none
- @param parentNestingTreeSubgraphNode
- reference of NestingTreeSubgraphNode
- @return none
- @throw none
- */
- LayerNode(NestingTreeSubgraphNode& parentNestingTreeSubgraphNode);
- /**
- Constructs new object of type LayerNode.
- @pre none
- @param parentNestingTreeSubgraphNode
- reference of NestingTreeSubgraphNode
-
- @param vGlobalVertex
- instance of VertexDescriptor
- @return none
- @throw none
- */
- LayerNode(NestingTreeSubgraphNode& parentNestingTreeSubgraphNode ,
- VertexDescriptor vGlobalVertex);
- //@}
- /** @name Modifiers
- * The methods under this section are responsible for modifying
- * an instance of LayerNode.
- */
- //@{
- /**
- This function sets parent Nesting Tree Subgraph Node of current LayerNode
- @pre none
- @param parentNestingTreeSubgraphNode
- parent Nesting Tree Subgraph Node of current LayerNode
- @return none
- @throws none
- */
- void setParentNestingTreeSubgraphNode(NestingTreeSubgraphNode& parentNestingTreeSubgraphNode);
-
- /**
- This function sets global vertex which current LayerNode should represent
- @pre none
- @param vGlobalVertex
- global vertex index to which current LayerNode should represent
- @return none
- @throws none
- */
- void setVertex(VertexDescriptor vGlobalVertex);
-
- /**
- This function sets parent Nesting Tree Subgraph Node and global vertex which current LayerNode should represent
- @pre none
- @param vGlobalVertex
- global vertex index to which current LayerNode should represent
- @return none
- @throws none
- */
- void setValues(NestingTreeSubgraphNode& parentNestingTreeSubgraphNode ,
- VertexDescriptor vGlobalVertex);
- /**
- This function sets Topological Order of current Layer Node
- @pre none
- @param iTopologicalOrder
- integer value for Layer Node Topological Order
- @return none
- @throws none
- */
- int setTopologicalOrder(int iTopologicalOrder);
-
- /**
- This function sets the Vertex Index from its SubgraphOrderingGraph
- @pre none
- @param iSubgraphOrderingGraphVertexIndex
- vertex index of LayerNode from its SubgraphOrderingGraph
- @return none
- @throws none
- */
- void setSubgraphOrderingGraphVertex(int iSubgraphOrderingGraphVertexIndex);
- //@}
-
- /** @name Queries
- * The methods under this section are responsible for accessing
- * an instance of type LayerNode.
- */
- //@{
- /**
- This function gets parent Nesting Tree Subgraph Node of current LayerNode
- @pre none
- @param none
- @return none
- @throws none
- */
- NestingTreeSubgraphNode &getParentNestingTreeSubgraphNode();
-
- /**
- This function gets global vertex which current LayerNode represents
- @pre none
- @param none
- @return none
- @throws none
- */
- VertexDescriptor getVertex();
-
- /**
- This function gets Topological Order of current Layer Node
- @pre none
- @param none
- @return integer Topological Order of current Layer Node
- @throws none
- */
- int getTopologicalOrder();
-
- /**
- This function gets the Vertex Index of this LayerNode in its SubgraphOrderingGraph
- @pre none
- @param vGlobalVertex
- global vertex index to which current LayerNode should represent
- @return none
- @throws none
- */
- int getSubgraphOrderingGraphVertex();
- /**
- This function prints the vertex name
- @pre none
- @param none
- @return none
- @throws none
- */
- void printName();
- //@}
-
- };
- #endif // LAYERNODE_H
|