dirtynode.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef DIRTYNODE_H
  2. #define DIRTYNODE_H
  3. #include <QString>
  4. #include <LayoutException/LayoutException.h>
  5. #include <ReaderWriterUtilities/AttributeConstants.h>
  6. /**
  7. Modifier Class
  8. DirtyNode : This class is for maintaining the attributes of nodes as we cannot directly access
  9. the attributes of nodes in the endElement part of the Sax Handler
  10. So store the attributes of node into member variables of this class using set() functiionality.
  11. and have to fetch those attributes in endElement using get() functionality.
  12. */
  13. class DirtyNode
  14. {
  15. private:
  16. QString m_sId; /*!< String to store a ID of the dirty node*/
  17. public:
  18. bool m_bIsDirtyNode; /*!< Boolean flag used to maintain the state for node whether it should be added in the graph or not. */
  19. /** @name Creators
  20. * The methods under this section are responsible for constructing
  21. * an instance of type DirtyNode.
  22. */
  23. //@{
  24. /**
  25. Constructs new object of type DirtyNode.
  26. @pre none
  27. @param none
  28. @return none
  29. @throw none
  30. */
  31. DirtyNode();
  32. //@}
  33. /** @name Modifiers
  34. * The methods under this section are responsible for modifying
  35. * an instance of DirtyNode.
  36. */
  37. //@{
  38. /**
  39. This function writes the node id
  40. @pre sId != empty
  41. @param sId
  42. @return none
  43. @throw LayoutException
  44. -# INVALID_PARAMETER if invalid id value is passed to set
  45. */
  46. void setID(QString sId);
  47. //@}
  48. /** @name Queries
  49. * The methods under this section are responsible for accessing
  50. * an instance of type DirtyNode.
  51. */
  52. //@{
  53. /**
  54. This function returns the id of a node which is already written
  55. @pre id should be already written
  56. @param none
  57. @return sId of node
  58. @throw LayoutException
  59. -# INVALID_ATTRIBUTE_VALUE if invalid attribute value is returned.
  60. */
  61. QString getID();
  62. //@}
  63. };
  64. #endif // DIRTYNODE_H