GraphElementProperties.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef GRAPHELEMENTPROPERTIES_H
  2. #define GRAPHELEMENTPROPERTIES_H
  3. #include <ReaderWriterUtilities/Attribute.h>
  4. #include <QListIterator>
  5. /**
  6. * @brief This class holds the list of graph element properties
  7. * for example 'node' is a graph element and it can have list of attributes
  8. */
  9. struct GraphElementProperties
  10. {
  11. AttributeList lstAttributeList;
  12. /**
  13. * Function to print attribute list of contained in GraphElementProperties
  14. *
  15. * @pre none
  16. *
  17. * @param none
  18. *
  19. * @return none
  20. *
  21. * @throw none
  22. */
  23. void print()
  24. {
  25. QListIterator<Attribute> attributeIter (lstAttributeList);
  26. while (attributeIter.hasNext())
  27. {
  28. Attribute attribute = attributeIter.next();
  29. attribute.print();
  30. }
  31. }
  32. /**
  33. * Function to return a java style iterator for Attribute list contained in this class GraphElementProperties
  34. *
  35. * @pre none
  36. *
  37. * @param none
  38. *
  39. * @return QListIterator of Attribute List contained current class
  40. *
  41. * @throw none
  42. */
  43. QListIterator<Attribute> iterator()
  44. {
  45. QListIterator<Attribute> lstIter(lstAttributeList);
  46. return lstIter;
  47. }
  48. };
  49. #endif // GRAPHELEMENTPROPERTIES_H