jsonObject.hh 984 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "config.h"
  3. #include "jsonContainer.hh"
  4. #include "jsonObjectEntry.hh"
  5. #include "jsonException.hh"
  6. class JSonObject: public JSonContainer
  7. {
  8. public:
  9. JSonObject(JSonContainer *parent);
  10. virtual ~JSonObject();
  11. void push(const std::string &key, JSonElement *child);
  12. JSonObject::const_iterator find(const std::string &key) const;
  13. bool contains(const std::string &) const;
  14. virtual JSonElement *firstChild();
  15. virtual const JSonElement *firstChild() const;
  16. const JSonElement* get(const std::string &) const;
  17. virtual std::string stringify() const;
  18. class DoubleKeyException: public JsonException
  19. {
  20. public:
  21. DoubleKeyException(unsigned long long offset, const std::string &key, LinearHistory &buf);
  22. };
  23. class NotAKeyException: public JsonException
  24. {
  25. public:
  26. NotAKeyException(unsigned long long offset, LinearHistory &buf);
  27. };
  28. };