Capitalized class names as per the "Style Guide for Python Code" at:
http://www.python.org/peps/pep-0008.html Because the bindings are out of synch, this is untested.
This commit is contained in:
parent
d34d818626
commit
897341e042
12 changed files with 33 additions and 33 deletions
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -44,7 +44,7 @@ Color create_from_string(const char* str)
|
|||
void export_color ()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<Color>("color",init<>())
|
||||
class_<Color>("Color",init<>())
|
||||
.def(init<int,int,int,boost::python::optional<int> >())
|
||||
.add_property("r",&Color::red,&Color::set_red)
|
||||
.add_property("g",&Color::green,&Color::set_green)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -28,14 +28,14 @@ void export_datasource_cache()
|
|||
using mapnik::singleton;
|
||||
using mapnik::CreateStatic;
|
||||
using namespace boost::python;
|
||||
class_<singleton<datasource_cache,CreateStatic>,boost::noncopyable>("singleton",no_init)
|
||||
class_<singleton<datasource_cache,CreateStatic>,boost::noncopyable>("Singleton",no_init)
|
||||
.def("instance",&singleton<datasource_cache,CreateStatic>::instance,
|
||||
return_value_policy<reference_existing_object>())
|
||||
.staticmethod("instance")
|
||||
;
|
||||
|
||||
class_<datasource_cache,bases<singleton<datasource_cache,CreateStatic> >,
|
||||
boost::noncopyable>("datasource_cache",no_init)
|
||||
boost::noncopyable>("DatasourceCache",no_init)
|
||||
.def("create",&datasource_cache::create)
|
||||
.staticmethod("create")
|
||||
.def("register_datasources",&datasource_cache::register_datasources)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -58,7 +58,7 @@ bool (Envelope<double>::*intersects_p3)(Envelope<double> const&) const = &Envelo
|
|||
void export_envelope()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<Envelope<double> >("envelope",init<double,double,double,double>())
|
||||
class_<Envelope<double> >("Envelope",init<double,double,double,double>())
|
||||
.def(init<>())
|
||||
.def(init<const coord<double,2>&, const coord<double,2>&>())
|
||||
.add_property("minx",&Envelope<double>::minx)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -38,7 +38,7 @@ namespace
|
|||
void export_filter()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<filter<Feature>,boost::noncopyable>("filter",no_init)
|
||||
class_<filter<Feature>,boost::noncopyable>("Filter",no_init)
|
||||
.def("__str__",&filter<Feature>::to_string);
|
||||
;
|
||||
def("filter",&create_filter);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -32,7 +32,7 @@ char const* rawdata(const Image32& image)
|
|||
void export_image()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<Image32>("image",init<int,int>())
|
||||
class_<Image32>("Image",init<int,int>())
|
||||
;
|
||||
def("rawdata",&rawdata);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -100,11 +100,11 @@ namespace
|
|||
void export_layer()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<std::vector<std::string> >("styles")
|
||||
class_<std::vector<std::string> >("Styles")
|
||||
.def(vector_indexing_suite<std::vector<std::string>,true >())
|
||||
;
|
||||
//class_<Layer>("layer",init<const Parameters&>("Layer constructor"))
|
||||
class_<Layer>("layer",no_init)
|
||||
class_<Layer>("Layer",no_init)
|
||||
.def("name",&Layer::name,return_value_policy<copy_const_reference>())
|
||||
.def("params",&Layer::params,return_value_policy<reference_existing_object>())
|
||||
.def("envelope",&Layer::envelope)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -76,10 +76,10 @@ struct map_pickle_suite : boost::python::pickle_suite
|
|||
void export_map()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<std::vector<Layer> >("layers")
|
||||
class_<std::vector<Layer> >("Layers")
|
||||
.def(vector_indexing_suite<std::vector<Layer> >())
|
||||
;
|
||||
class_<Map>("map",init<int,int,boost::python::optional<int> >())
|
||||
class_<Map>("Map",init<int,int,boost::python::optional<int> >())
|
||||
.add_property("width",&Map::getWidth)
|
||||
.add_property("height",&Map::getHeight)
|
||||
.add_property("srid",&Map::srid)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -80,11 +80,11 @@ struct parameters_pickle_suite : boost::python::pickle_suite
|
|||
void export_parameters()
|
||||
{
|
||||
using namespace boost::python;
|
||||
class_<parameter>("parameter",init<std::string,std::string>())
|
||||
class_<parameter>("Parameter",init<std::string,std::string>())
|
||||
.def_pickle(parameter_pickle_suite())
|
||||
;
|
||||
|
||||
class_<parameters>("parameters",init<>())
|
||||
class_<parameters>("Parameters",init<>())
|
||||
//.def("add",add1)
|
||||
//.def("add",add2)
|
||||
.def("get",¶meters::get)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -87,15 +87,15 @@ BOOST_PYTHON_MODULE(_mapnik)
|
|||
using namespace boost::python;
|
||||
|
||||
class_<datasource,boost::shared_ptr<datasource>,
|
||||
boost::noncopyable>("datasource",no_init)
|
||||
boost::noncopyable>("Datasource",no_init)
|
||||
.def("envelope",&datasource::envelope,
|
||||
return_value_policy<reference_existing_object>())
|
||||
;
|
||||
|
||||
class_<symbolizer,boost::noncopyable> ("symbolizer_",no_init)
|
||||
class_<symbolizer,boost::noncopyable> ("Symbolizer_",no_init)
|
||||
;
|
||||
class_<boost::shared_ptr<symbolizer>,
|
||||
boost::noncopyable>("symbolizer",no_init)
|
||||
boost::noncopyable>("Symbolizer",no_init)
|
||||
;
|
||||
export_parameters();
|
||||
export_color();
|
||||
|
@ -109,7 +109,7 @@ BOOST_PYTHON_MODULE(_mapnik)
|
|||
export_datasource_cache();
|
||||
|
||||
|
||||
class_<coord<double,2> >("coord",init<double,double>())
|
||||
class_<coord<double,2> >("Coord",init<double,double>())
|
||||
.def_readwrite("x", &coord<double,2>::x)
|
||||
.def_readwrite("y", &coord<double,2>::y)
|
||||
;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -33,11 +33,11 @@ void export_rule()
|
|||
{
|
||||
using namespace boost::python;
|
||||
|
||||
class_<symbolizers>("symbolizers",init<>("TODO"))
|
||||
class_<symbolizers>("Symbolizers",init<>("TODO"))
|
||||
.def(vector_indexing_suite<symbolizers>())
|
||||
;
|
||||
|
||||
class_<rule_type>("rule",init<>("default ctor"))
|
||||
class_<rule_type>("Rule",init<>("default ctor"))
|
||||
.def(init<std::string const&,
|
||||
boost::python::optional<std::string const&,double,double> >())
|
||||
.add_property("name",make_function
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -38,7 +38,7 @@ void export_stroke ()
|
|||
.value("BEVEL_JOIN",BEVEL_JOIN)
|
||||
;
|
||||
|
||||
class_<stroke>("stroke",init<>())
|
||||
class_<stroke>("Stroke",init<>())
|
||||
.def(init<Color,float>())
|
||||
.add_property("color",make_function
|
||||
(&stroke::get_color,return_value_policy<reference_existing_object>()),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* This file is part of python_mapnik (c++/python mapping toolkit)
|
||||
* Copyright (C) 2005 Artem Pavlenko
|
||||
* Copyright (C) 2005 Artem Pavlenko, Jean-Francois Doyon
|
||||
*
|
||||
* Mapnik is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -29,10 +29,10 @@ void export_style()
|
|||
{
|
||||
using namespace boost::python;
|
||||
|
||||
class_<rules>("rules",init<>("default ctor"))
|
||||
class_<rules>("Rules",init<>("default ctor"))
|
||||
.def(vector_indexing_suite<rules>())
|
||||
;
|
||||
class_<feature_type_style>("style",init<>("default style constructor"))
|
||||
class_<feature_type_style>("Style",init<>("default style constructor"))
|
||||
.add_property("rules",make_function
|
||||
(&feature_type_style::get_rules,return_value_policy<reference_existing_object>()))
|
||||
;
|
||||
|
|
Loading…
Add table
Reference in a new issue