Advertisement
puneet

ManagedObjectMap.h

Jul 18th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2012 Puneet Goyal <[email protected]>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License version 2 as published by the Free Software Foundation;
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * Library General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Library General Public License
  14. * along with this library; see the file COPYING.LIB. If not, write to
  15. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16. * Boston, MA 02110-1301, USA.
  17. */
  18.  
  19. #ifndef MANAGED_OBJECT_MAP_H
  20. #define MANAGED_OBJECT_MAP_H
  21.  
  22. #include <QtDBus>
  23.  
  24. class ManagedObjectMap
  25. {
  26. public:
  27. ManagedObjectMap();
  28. ManagedObjectMap(const QMap<QString, QMap<QString, QMap<QString, QVariant> > > &managedObjectMap);
  29. ManagedObjectMap(const ManagedObjectMap &other);
  30. ManagedObjectMap& operator=(const ManagedObjectMap &other);
  31. ~ManagedObjectMap();
  32.  
  33. friend QDebug &operator<<(QDebug dbg, const ManagedObjectMap &managedObjectMap);
  34.  
  35. friend QDBusArgument &operator<<(QDBusArgument &argument, const ManagedObjectMap &managedObjectMap);
  36. friend const QDBusArgument &operator>>(const QDBusArgument &argument, ManagedObjectMap &managedObjectMap);
  37.  
  38. friend QDBusArgument &operator<<(QDBusArgument &argument, QMap<QString, QMap<QString, QVariant> > &managedInterfaceMap);
  39. friend const QDBusArgument &operator>>(const QDBusArgument &argument, QMap<QString, QMap<QString, QVariant> > &managedInterfaceMap);
  40.  
  41. QMap<QString, QMap <QString, QMap<QString, QVariant> > > getMap() const;
  42.  
  43. //register ManagedObjectMap with the Qt type system
  44. static void registerMetaType();
  45.  
  46. private:
  47. QMap<QString, QMap <QString, QMap<QString, QVariant> > > m_map;
  48. };
  49.  
  50. Q_DECLARE_METATYPE(ManagedObjectMap)
  51.  
  52. #endif // MANAGED_OBJECT_MAP_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement