#ifndef H_FACTORY_RECIPE
#define H_FACTORY_RECIPE

#include <list>



namespace lust {

class Item;
template <typename T> class ConstIterator;



class FurnaceRecipe
{
    
public:
    struct Component
    {
        const Item *item;
        const unsigned long count;
    };
    using Product = Component;
    
    //
    
    FurnaceRecipe(unsigned long fuel);
    
    //
    
    void addComponent(Component *component);
    void addProduct(Product *product);
    
    ConstIterator<Component> * getComponentIterator() const;
    ConstIterator<Product> * getProductIterator() const;
    unsigned long getRequiredFuel() const;
    
private:
    std::list<Component *> m_components;
    std::list<Product *> m_products;
    unsigned long m_fuel;
};

}

#endif // H_FACTORY_RECIPE
