jsonContainer.hh 609 B

123456789101112131415161718192021222324252627
  1. /**
  2. * jsonContainer.hh for jsonstroller
  3. *
  4. * Author: isundil <isundill@gmail.com>
  5. **/
  6. #pragma once
  7. #include <list>
  8. #include "jsonElement.hh"
  9. class JSonContainer: public JSonElement, public std::list<JSonElement*>
  10. {
  11. public:
  12. JSonContainer(JSonContainer *parent);
  13. virtual ~JSonContainer();
  14. virtual float diff(const JSonElement *) const;
  15. virtual bool operator==(const JSonElement *) const;
  16. /**
  17. * Get the first item of this container
  18. **/
  19. virtual JSonElement *firstChild() =0;
  20. virtual const JSonElement *firstChild() const =0;
  21. };