jsonObjectEntry.hh 639 B

1234567891011121314151617181920212223242526272829303132
  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. /**
  17. * Get associated value
  18. **/
  19. const JSonElement *operator*() const;
  20. JSonElement *operator*();
  21. protected:
  22. const std::string key;
  23. JSonElement * const value;
  24. };