LayoutEnum.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #ifndef LAYOTENUM_H
  2. #define LAYOTENUM_H
  3. #include <GraphLayoutLibrary_global.h>
  4. #include <Common/CommonConstants.h>
  5. /**
  6. * @brief The LayoutEnum class
  7. *
  8. * The class provides enumerable types used in layouting and helpers around them.
  9. */
  10. class GRAPHLAYOUTLIBRARYSHARED_EXPORT LayoutEnum
  11. {
  12. public:
  13. //***************************GRAPH ENUMS***************************************
  14. /**
  15. * enum that defines type of a node in a graph
  16. */
  17. enum NodeType { UpperBorderNode = 999,
  18. LowerBorderNode = 1000,
  19. DummyNode = 1001,
  20. GraphNode = 1002,
  21. ExpandableNode = 1003,
  22. VerticalBorderNode = 1004,
  23. // for adding if empty graph is found
  24. InvisibleNode = 1005
  25. };
  26. /**
  27. * enum that defines type of an edge in a graph
  28. */
  29. enum EdgeType { NestingEdge = 1100,
  30. GraphEdge = 1101,
  31. LongEdgeSegment = 1102,
  32. InvisibleEdge = 1103,
  33. VerticalBorderEdgeSegment = 1104
  34. };
  35. //***************************GRAPH ENUMS END***********************************
  36. //***************************CIRCULAR LAYOUT ENUMS*****************************
  37. /**
  38. * enum that defines ordering criterion of a node in a circular layout
  39. */
  40. enum VertexOrderCriteria
  41. {
  42. TopologicalOrder = 0,
  43. ConnectedComponentOrder = 1,
  44. DefaultOrder = 2
  45. };
  46. //****************************CIRCULAR LAYOUT ENUMS END************************
  47. //****************************HIERARCHICAL LAYOUT ENUMS************************
  48. //****************************HIERARCHICAL LAYOUT ENUMS END********************
  49. /** @name Creators
  50. * The methods under this section are responsible for constructing or
  51. * destructing an instance of type LayoutEnum.
  52. */
  53. //@{
  54. /**
  55. Constructs new object of type Enum.
  56. @pre none
  57. @param none
  58. @return none
  59. @throw none
  60. */
  61. LayoutEnum();
  62. //@}
  63. /** @name Queries
  64. * The methods under this section are responsible for accessing
  65. * an instance of type LayoutEnum.
  66. */
  67. //@{
  68. /**
  69. This fucntion returns true if specified vertex ordering criteria is valid otherwise false
  70. @pre none
  71. @param enVertexOrderCriteria
  72. vertex ordering criteria containing Enum::VertexOrderCriteria enVertexOrderCriteria type
  73. @return true if valid vertex ordering criteria otherwise false
  74. @throw none
  75. */
  76. static bool isValidVertexOrderingCriteria(LayoutEnum::VertexOrderCriteria enVertexOrderCriteria);
  77. /**
  78. This fucntion returns true if specified vertex type is valid otherwise false
  79. @pre none
  80. @param enVertexType
  81. vertex type containing Enum::VertexType type
  82. @return true if valid vertex type otherwise false
  83. @throw none
  84. */
  85. static bool isValidCircularVertexType(LayoutEnum::NodeType enVertexType);
  86. //@}
  87. };
  88. #endif // LAYOTENUM_H