RecipieLoader.h 844 B

1234567891011121314151617181920212223242526
  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) const;
  15. ShapedRecipieList* zShapedRecipieList(const char* name) const;
  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. ItemModifier* loadModifier(Framework::JSON::JSONObject* zModifier);
  22. Framework::JSON::Validator::JSONValidator* zRecipieValidator();
  23. };