Desktop/sourceforge/geometria/src/kernel/geo_element.hpp

Go to the documentation of this file.
00001 /*
00002 This file is part of geometria.
00003 
00004 geometria is free software; you can redistribute it and/or modify 
00005 it under the terms of the GNU General Public License as published 
00006 by the Free Software Foundation; either version 2 of the License, 
00007 or (at your option) any later version.
00008 
00009 geometria is distributed in the hope that it will be useful, but 
00010 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
00011 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
00012 License for more details.
00013 
00014 You should have received a copy of the GNU General Public 
00015 License along with geometria; if not, write to the Free Software 
00016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00017 
00018 (c) Philipp Moritz, 2006
00019 */
00020 
00021 #ifndef GEO_ELEMENT_HPP
00022 #define GEO_ELEMENT_HPP
00023 
00024 #include "subject.hpp"
00025 #include "observer.hpp"
00026 #include "../ui/drawing_context.hpp"
00027 
00028 #include <iostream>
00029 #include <boost/noncopyable.hpp>
00030 
00034 class geo_element : public subject, public observer, public boost::noncopyable
00035 {
00036 protected:
00037         std::string m_name;
00038 public:
00039         geo_element(const std::string& name);
00040         virtual ~geo_element(void);
00041 
00042         virtual std::ostream& put(std::ostream& s) = 0;
00043 
00044         std::string get_name();
00045         void set_name(const std::string& name);
00046 
00047         virtual void update() = 0;
00048 
00049         virtual void draw(boost::shared_ptr<drawing_context> context) = 0;
00050 };
00051 
00052 std::ostream& operator<<(std::ostream& s, geo_element& el);
00053 
00054 #endif

Generated on Fri May 19 19:30:28 2006 for geometria by  doxygen 1.4.6-NO