/home/andreas/src/svn/mapnik/include/mapnik/layer.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * 
00003  * This file is part of Mapnik (c++ mapping toolkit)
00004  *
00005  * Copyright (C) 2006 Artem Pavlenko
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  *
00021  *****************************************************************************/
00022 //$Id: layer.hpp 39 2005-04-10 20:39:53Z pavlenko $
00023 
00024 #ifndef LAYER_HPP
00025 #define LAYER_HPP
00026 // stl
00027 #include <vector>
00028 // boost
00029 #include <boost/shared_ptr.hpp>
00030 // mapnik
00031 #include <mapnik/feature.hpp>
00032 #include <mapnik/datasource.hpp>
00033 
00034 namespace mapnik
00035 {
00036     class MAPNIK_DECL Layer
00037     {
00038     public:
00039         explicit Layer(std::string const& name, std::string const& srs="+proj=latlong +datum=WGS84");
00040         Layer(Layer const& l);
00041         Layer& operator=(Layer const& l);
00042         bool operator==(Layer const& other) const;
00043         void set_name(std::string const& name);
00044         const std::string& name() const;
00045         void set_title(std::string const& title);
00046         const std::string& title() const;
00047         void set_abstract(std::string const& abstract);
00048         const std::string& abstract() const;
00049         void set_srs(std::string const& srs);
00050         std::string const& srs() const;
00051         void add_style(std::string const& stylename);
00052         std::vector<std::string> const& styles() const;
00053         std::vector<std::string>& styles();
00054         void setMinZoom(double minZoom);
00055         void setMaxZoom(double maxZoom);
00056         double getMinZoom() const;
00057         double getMaxZoom() const;
00058         void setActive(bool active);
00059         bool isActive() const;
00060         void setQueryable(bool queryable);
00061         bool isQueryable() const;
00062         bool isVisible(double scale) const;
00063         void set_clear_label_cache(bool clear_cache);
00064         bool clear_label_cache() const; 
00065         void set_datasource(datasource_ptr const& ds);
00066         datasource_ptr datasource() const;
00067         Envelope<double> envelope() const;
00068         ~Layer();
00069     private:
00070         void swap(const Layer& other);
00071 
00072         std::string name_;
00073         std::string title_;
00074         std::string abstract_;
00075         std::string srs_;
00076         
00077         double minZoom_;
00078         double maxZoom_;
00079         bool active_;
00080         bool queryable_;
00081         bool clear_label_cache_;
00082         std::vector<std::string>  styles_;
00083         datasource_ptr ds_;
00084     };
00085 }
00086 
00087 #endif //LAYER_HPP

Generated on Thu Jul 19 17:59:26 2007 for Mapnik by  doxygen 1.4.7