RecipieLoader.h 763 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <Array.h>
  3. #include "RecipieList.h"
  4. class RecipieLoader : public virtual Framework::ReferenceCounter
  5. {
  6. private:
  7. Framework::RCArray<RecipieList> lists;
  8. Framework::RCArray<ShapedRecipieList> shapedLists;
  9. Framework::JSON::Validator::JSONValidator* validator;
  10. public:
  11. RecipieLoader();
  12. ~RecipieLoader();
  13. void loadRecipies(const char* path);
  14. RecipieList* zRecipieList(const char* name);
  15. ShapedRecipieList* zShapedRecipieList(const char* name);
  16. void registerRecipieList(const char* name);
  17. void registerShapedRecipieList(const char* name);
  18. private:
  19. void loadRecipie(Framework::JSON::JSONObject* zRecipie);
  20. ItemFilter* loadFilter(Framework::JSON::JSONObject* zFilter);
  21. Framework::JSON::Validator::JSONValidator* zRecipieValidator();
  22. };