#include "WimaDataContainer.h"

WimaDataContainer::WimaDataContainer(QObject *parent)
    :   QObject     (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(QSharedPointer<const WimaPlanData> planData)
{
    _planData = planData;

    emit newDataAvailable();
}

/*!
 * \fn const WimaPlanData &WimaDataContainer::pull() const
 *
 * Returns a constant referenc to the \c WimaPlanData member.
 *
 * \sa WimaPlanData
 */
QSharedPointer<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
 */




