Markable.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: Markable.hpp 1644 2009-01-27 19:26:14Z ckiesch $"
00002 
00004 
00005 //============================================================================
00006 //
00007 //  This file is part of GPSTk, the GPS Toolkit.
00008 //
00009 //  The GPSTk is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU Lesser General Public License as published
00011 //  by the Free Software Foundation; either version 2.1 of the License, or
00012 //  any later version.
00013 //
00014 //  The GPSTk is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 //  GNU Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with GPSTk; if not, write to the Free Software Foundation,
00021 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //  
00023 //  Copyright 2004, The University of Texas at Austin
00024 //
00025 //============================================================================
00026 
00027 
00028 #ifndef VDRAW_MARKABLE_H
00029 #define VDRAW_MARKABLE_H
00030 
00031 #include "BasicShape.hpp"
00032 #include "Marker.hpp"
00033 
00034 namespace vdraw
00035 {
00038 
00046    class Markable : public BasicShape {
00047  
00048    public:
00049 
00057       Markable(void)
00058          : BasicShape(), hasMarker(false)
00059       {}
00060 
00065       Markable(const StrokeStyle& istyle)
00066          : BasicShape(istyle), hasMarker(false)
00067       {}
00068 
00073       Markable(const Marker& imarker)
00074          : BasicShape(), marker(imarker), hasMarker(true)
00075       {}
00076 
00082       Markable(const StrokeStyle& istyle, const Marker& imarker)
00083          : BasicShape(istyle), marker(imarker), hasMarker(true)
00084       {}
00085 
00087       inline bool hasOwnMarker(void) const { return hasMarker; }
00088 
00090       inline Marker getMarker(void) const { return marker; }
00091       
00093       inline void setMarker(const Marker& imarker) { marker=imarker;hasMarker=true; }  
00094 
00096       inline void removeMarker(void) { hasMarker=false; }
00097 
00098    protected:
00099 
00101       Marker marker;
00102 
00104       bool hasMarker;
00105 
00106    private:
00107 
00108 
00109    }; // class Markable
00110 
00112 
00113 } // namespace vdraw
00114 
00115 #endif //VDRAW_MARKABLE_H
00116 
00117 
00118 

Generated on Tue May 22 03:30:59 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1