/**
 * @file cart_shelf.cpp
 * @author Jan Holáň, xholan11 (xholan11@vutbr.cz)
 * @brief translated with gcc version 12.2.1
 * @version 0.1
 * @date 2023-05-01
 * 
 * @copyright Copyright (c) 2023
 * 
 */

#include "WarehousePickingOpt.h"

CartShelf::CartShelf(float _width, float _height, float _depth)
    : width(_width), height(_height), depth(_depth)
{
}

void CartShelf::addBox_oneItemized(Box box)
{
    this->boxes.one_item_box_vect.push_back(box);
    this->used_width += box.width;
}

void CartShelf::addBox_fullItemized(Box box)
{
    this->boxes.full_box_vect.push_back(box);
    this->used_width += box.width;
}

ITEMS_IN_BOXES_DECOMP_T *CartShelf::getBoxes()
{
    return &this->boxes;
}

float CartShelf::getWidth()
{
    return this->width;
}

float CartShelf::getHeight()
{
    return this->height;
}

float CartShelf::getDepth()
{
    return this->depth;
}

float CartShelf::getFreeWidth()
{
    return this->width - this->used_width;
}
