gunkiss/src/Item.hpp

56 lines
1.4 KiB
C++

#ifndef Item_h_
#define Item_h_
/* including so we can use GLuint type */
#if defined(__EMSCRIPTEN__)
#include <GL/glew.h>
#else
#include "glew/glew.h"
#endif
#include <vector>
#include <sstream>
#include <string>
#include <memory>
#include <functional>
#include <SDL.h>
#include "json/json.hpp"
#include "extension.hpp"
#include "Node.hpp"
#include "Texture.hpp"
class Item : public Node
{
private:
nlohmann::json json = {};
std::vector<Texture> 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<Texture>& 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