1
1

jsonObjectEntry.hh 741 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * jsonObjectEntry.hh for jsonstroller
  3. *
  4. * Author: isundil <isundill@gmail.com>
  5. **/
  6. #pragma once
  7. #include "jsonElement.hh"
  8. class JSonObject;
  9. class JSonObjectEntry: public JSonElement
  10. {
  11. public:
  12. JSonObjectEntry(JSonObject*, const std::string &key, JSonElement *item);
  13. virtual ~JSonObjectEntry();
  14. std::string stringify() const;
  15. bool operator==(const std::string &) const;
  16. bool operator<(const JSonElement *) const;
  17. bool operator<(const JSonElement &) const;
  18. /**
  19. * Get associated value
  20. **/
  21. const JSonElement *operator*() const;
  22. JSonElement *operator*();
  23. protected:
  24. const std::string key;
  25. JSonElement * const value;
  26. };