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