/* * LinkedCell_View_ModelWrapper.hpp * * Created on: Dec 22, 2011 * Author: heber */ #ifndef LINKEDCELL_VIEW_MODELWRAPPER_HPP_ #define LINKEDCELL_VIEW_MODELWRAPPER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif namespace LinkedCell { class LinkedCell_Model; /** This class wraps the LinkedCell_Model. * * This shall prevent any function in LinkedCell_View from tampering with * the Model ref. This is only allowed for the Controller. */ class LinkedCell_View_ModelWrapper { public: LinkedCell_View_ModelWrapper(const LinkedCell_Model *_model) : model(_model) {} ~LinkedCell_View_ModelWrapper() {} const LinkedCell_Model * const getModel() const { return model; } private: friend class LinkedCell_Controller; void setModel(const LinkedCell_Model *_model) { model = _model; } private: const LinkedCell_Model * model; }; } // namespace LinkedCell #endif /* LINKEDCELL_VIEW_MODELWRAPPER_HPP_ */