1
1

jsonObject.hh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 erase(const std::string &);
  14. bool contains(const std::string &) const;
  15. virtual JSonElement *firstChild();
  16. virtual const JSonElement *firstChild() const;
  17. const JSonElement* get(const std::string &) const;
  18. virtual std::string stringify() const;
  19. class DoubleKeyException: public JsonException
  20. {
  21. public:
  22. DoubleKeyException(unsigned long long offset, const std::string &key, LinearHistory &buf);
  23. };
  24. class NotAKeyException: public JsonException
  25. {
  26. public:
  27. NotAKeyException(unsigned long long offset, LinearHistory &buf);
  28. };
  29. };