1
1

jsonObjectEntry.hh 793 B

1234567891011121314151617181920212223242526272829303132333435
  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. bool operator<(const JSonElement &) const;
  19. /**
  20. * Get associated value
  21. **/
  22. const JSonElement *operator*() const;
  23. JSonElement *operator*();
  24. protected:
  25. const std::string key;
  26. JSonElement * const value;
  27. };