jsonObjectEntry.hh 630 B

123456789101112131415161718192021222324252627282930
  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. const JSonElement *operator*() const;
  17. JSonElement *operator*();
  18. bool match(const std::string &) const;
  19. protected:
  20. const std::string key;
  21. JSonElement * const value;
  22. };