#ifndef Item_h_ #define Item_h_ /* including so we can use GLuint type */ #if defined(__EMSCRIPTEN__) #include #else #include "glew/glew.h" #endif #include #include #include #include #include #include #include "json/json.hpp" #include "extension.hpp" #include "Node.hpp" #include "Texture.hpp" class Item : public Node { private: nlohmann::json json = {}; std::vector image_textures; std::string brand_name = "", product_name = "", upc = ""; int current_image_index = 0; void set_text_property(const std::string&, std::string&, const std::string&); /* * add properties: ingredients, protein weight, nutrition grade, popularity, "serving unit", keywords, * allergens, calories, fat, saturated fat, cholesterol, sodium, carbohydrates, fiber, sugar, potassium */ public: Item(Node*); void add_image_texture(Texture); const std::vector& get_image_textures() const; const Texture& get_active_image_texture() const; void set_brand_name(const std::string&); const std::string& get_brand_name() const; void set_product_name(const std::string&); const std::string& get_product_name() const; void set_upc(const std::string&); const std::string& get_upc() const; std::string get_full_name() const; void increment_image_index(int = 1); }; #endif