00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEO_POINT_HPP
00022 #define GEO_POINT_HPP
00023
00024 #include "geo_element.hpp"
00025 #include "point_algorithm.hpp"
00026
00027 #include "point_formater_strategy.hpp"
00028 #include "../ui/point_normal_style.hpp"
00029
00030 #include <vector>
00031 #include <iostream>
00032 #include <boost/shared_ptr.hpp>
00033
00034 class geo_point : public geo_element
00035 {
00036 private:
00037 boost::shared_ptr<point_algorithm> m_parent_algorithm;
00038 boost::shared_ptr<point_formater_strategy> m_paint_strategy;
00039 geo_point(const geo_point& other);
00040 const geo_point& operator=(const geo_point& other);
00041 public:
00042 geo_point(const std::string& name, boost::shared_ptr<point_algorithm> algo,
00043 boost::shared_ptr<point_formater_strategy> paint_strategy
00044 = boost::shared_ptr<point_normal_style>(new point_normal_style()));
00045 virtual ~geo_point();
00046
00047 virtual std::ostream& put(std::ostream& s);
00048
00049 point get_point() const;
00050
00051 void change_parent_algo(boost::shared_ptr<point_algorithm> new_algo);
00052
00053 virtual void update();
00054
00055 virtual void draw(boost::shared_ptr<drawing_context> context);
00056
00057 bool is_free_point();
00058 };
00059
00060 #endif