allow mapnik::value_holder to store nulls, mainly to make it possible to return PyNone in python bindings

This commit is contained in:
Dane Springmeyer 2011-12-02 17:01:38 -08:00
parent 8d3b990fbd
commit 437f71cdef

View file

@ -23,19 +23,22 @@
#ifndef MAPNIK_PARAMS_HPP #ifndef MAPNIK_PARAMS_HPP
#define MAPNIK_PARAMS_HPP #define MAPNIK_PARAMS_HPP
// mapnik // boost
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/none.hpp> #include <boost/none.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
// mapnik
#include <mapnik/value.hpp>
// stl // stl
#include <string> #include <string>
#include <map> #include <map>
namespace mapnik namespace mapnik
{ {
typedef boost::variant<int,double,std::string> value_holder; typedef boost::variant<value_null,int,double,std::string> value_holder;
typedef std::pair<const std::string, value_holder> parameter; typedef std::pair<const std::string, value_holder> parameter;
typedef std::map<const std::string, value_holder> param_map; typedef std::map<const std::string, value_holder> param_map;