Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

XmlItem.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (c) Copyright 2011 - 2012 Blackrock Microsystems
  4. //
  5. // $Workfile: XmlItem.h $
  6. // $Archive: /common/XmlItem.h $
  7. // $Revision: 1 $
  8. // $Date: 4/4/12 4:24p $
  9. // $Author: Ehsan $
  10. //
  11. // $NoKeywords: $
  12. //
  13. //////////////////////////////////////////////////////////////////////////////
  14. //
  15. // PURPOSE:
  16. //
  17. // Common XML element
  18. //
  19. #ifndef XMLITEM_H_INCLUDED
  20. #define XMLITEM_H_INCLUDED
  21. #include <QMetaType>
  22. #include <QString>
  23. #include <QMap>
  24. #include <QVariant>
  25. // Author & Date: Ehsan Azar 4 April 2012
  26. // Purpose: Any user data that can be stored in XML
  27. class XmlItem
  28. {
  29. public:
  30. XmlItem() {;}
  31. virtual ~XmlItem() {;}
  32. XmlItem(const XmlItem & other);
  33. public:
  34. virtual QVariant XmlValue() const {return m_xmlValue;}
  35. virtual QString XmlName() const {return m_xmlTag;}
  36. virtual QMap<QString, QVariant> XmlAttribs() const {return m_xmlAttribs;}
  37. bool IsValid() const {return m_xmlValue.isValid();}
  38. QString Attribute(QString strKey) { return m_xmlAttribs.value(strKey).toString(); }
  39. protected:
  40. QVariant m_xmlValue;
  41. QString m_xmlTag;
  42. QMap<QString, QVariant> m_xmlAttribs;
  43. };
  44. #endif // include guard