/* * LinkedCell_View.hpp * * Created on: Nov 15, 2011 * Author: heber */ #ifndef LINKEDCELL_VIEW_HPP_ #define LINKEDCELL_VIEW_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "LinkedCell/types.hpp" class LinkedCell_ControllerTest; class LinkedCell_ViewTest; class TesselPoint; class Vector; namespace LinkedCell { class LinkedCell_Controller; class LinkedCell_Model; class LinkedCell_View_ModelWrapper; /** This is the view of the MVC ansatz for the LinkedCell structure. * * \sa linkedcell * * The view contains high-level functions for the user to use. He does not * need to know anything about the inner workings. * */ class LinkedCell_View { //!> grant view unit test access to private parts friend class ::LinkedCell_ViewTest; //!> grant controller unit test access to private parts (needs to check on modelwrapper) friend class ::LinkedCell_ControllerTest; public: LinkedCell_View(const LinkedCell_View &_view); ~LinkedCell_View(); LinkedList getAllNeighbors(const double radius, const Vector ¢er) const; LinkedList getPointsInsideSphere(const double radius, const Vector ¢er) const; private: friend class LinkedCell_Controller; // constructing views is allowed for the controller explicit LinkedCell_View(const LinkedCell_Model &_LC); // don't allow any view assignments or default cstors LinkedCell_View & operator=(const LinkedCell_View &_view); LinkedCell_View & operator=(LinkedCell_View &_view); LinkedCell_View(); private: typedef std::set ModelInstanceMap; //!> static map to allow for RAII pattern static ModelInstanceMap RAIIMap; //!> internal reference to the underlying model LinkedCell_View_ModelWrapper * const LC; }; } #endif /* LINKEDCELL_VIEW_HPP_ */