#include "WimaDataContainer.h"

WimaDataContainer::WimaDataContainer(QObject *parent)
    :   QObject     (parent)
    ,   _planData   (this /* parent */)
{

}

/*!
 * \fn void WimaDataContainer::push(const WimaPlanData &planData)
 *
 * Updates the \c WimaPlanData members content with \a planData.
 * Emits the planDataChanged() signal.
 *
 * \sa WimaPlanData
 */
void WimaDataContainer::push(const WimaPlanData &planData)
{
    _planData = planData;

    emit newDataAvailable();
}

/*!
 * \fn const WimaPlanData &WimaDataContainer::pull() const
 *
 * Returns a constant referenc to the \c WimaPlanData member.
 *
 * \sa WimaPlanData
 */
const WimaPlanData &WimaDataContainer::pull() const
{
    return  _planData;
}

/*!
 * \class WimaDataContainer
 * \brief Data container designed for data exchange between \c WimaPlaner and \c WimaController.
 * Data container designed for data exchange between \c WimaPlaner and \c WimaController.
 * It is meant that only one instance of this class exists. Both \c WimaPlaner and \c WimaController
 * have a reference to this instance and can modify its data.
 *
 * \sa WimaController, WimaPlaner
 */




