Skip to content

Commit

Permalink
update src and include dirs from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Jul 12, 2013
1 parent 1138708 commit 2e134f6
Show file tree
Hide file tree
Showing 109 changed files with 1,672 additions and 1,073 deletions.
1 change: 0 additions & 1 deletion include/mapnik/cairo_context.hpp
Expand Up @@ -44,7 +44,6 @@

// cairo
#include <cairo.h>
#include <cairo-ft.h>

// stl
#include <map>
Expand Down
8 changes: 7 additions & 1 deletion include/mapnik/config.hpp
Expand Up @@ -39,9 +39,15 @@
# pragma warning(disable : 4996) //_CRT_SECURE_NO_DEPRECATE
# endif
#else
# if __GNUC__ >= 4
# define MAPNIK_EXP __attribute__ ((visibility ("default")))
# define MAPNIK_DECL __attribute__ ((visibility ("default")))
# define MAPNIK_IMP __attribute__ ((visibility ("default")))
# else
# define MAPNIK_EXP
# define MAPNIK_IMP
# define MAPNIK_DECL
# define MAPNIK_IMP
# endif
#endif

#define PROJ_ENVELOPE_POINTS 20
Expand Down
2 changes: 2 additions & 0 deletions include/mapnik/config_error.hpp
Expand Up @@ -23,6 +23,8 @@
#ifndef MAPNIK_CONFIG_ERROR_HPP
#define MAPNIK_CONFIG_ERROR_HPP

#include <mapnik/config.hpp>

#include <exception>
#include <string>

Expand Down
104 changes: 0 additions & 104 deletions include/mapnik/css_color_grammar_def.hpp

This file was deleted.

32 changes: 18 additions & 14 deletions include/mapnik/datasource.hpp
Expand Up @@ -47,7 +47,7 @@ struct MAPNIK_DECL Featureset : private mapnik::noncopyable
virtual ~Featureset() {}
};

typedef MAPNIK_DECL boost::shared_ptr<Featureset> featureset_ptr;
typedef boost::shared_ptr<Featureset> featureset_ptr;

class MAPNIK_DECL datasource_exception : public std::exception
{
Expand Down Expand Up @@ -134,19 +134,23 @@ class datasource_deleter

typedef boost::shared_ptr<datasource> datasource_ptr;

#define DATASOURCE_PLUGIN(classname) \
extern "C" MAPNIK_EXP const char * datasource_name() \
{ \
return classname::name(); \
} \
extern "C" MAPNIK_EXP datasource* create(parameters const& params) \
{ \
return new classname(params); \
} \
extern "C" MAPNIK_EXP void destroy(datasource *ds) \
{ \
delete ds; \
}
#ifdef MAPNIK_STATIC_PLUGINS
#define DATASOURCE_PLUGIN(classname)
#else
#define DATASOURCE_PLUGIN(classname) \
extern "C" MAPNIK_EXP const char * datasource_name() \
{ \
return classname::name(); \
} \
extern "C" MAPNIK_EXP datasource* create(parameters const& params) \
{ \
return new classname(params); \
} \
extern "C" MAPNIK_EXP void destroy(datasource *ds) \
{ \
delete ds; \
}
#endif

}

Expand Down
3 changes: 0 additions & 3 deletions include/mapnik/datasource_cache.hpp
Expand Up @@ -35,8 +35,6 @@
// stl
#include <map>

struct lt__handle;

namespace mapnik {

class PluginInfo;
Expand All @@ -57,7 +55,6 @@ class MAPNIK_DECL datasource_cache
~datasource_cache();
std::map<std::string,boost::shared_ptr<PluginInfo> > plugins_;
bool registered_;
bool insert(std::string const& name,lt__handle * const module);
std::vector<std::string> plugin_directories_;
};
}
Expand Down
18 changes: 17 additions & 1 deletion include/mapnik/debug_symbolizer.hpp
Expand Up @@ -25,14 +25,30 @@

#include <mapnik/config.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/enumeration.hpp>

namespace mapnik
{

enum debug_symbolizer_mode_enum {
DEBUG_SYM_MODE_COLLISION,
DEBUG_SYM_MODE_VERTEX,
debug_symbolizer_mode_enum_MAX
};

DEFINE_ENUM( debug_symbolizer_mode_e, debug_symbolizer_mode_enum );

struct MAPNIK_DECL debug_symbolizer :
public symbolizer_base
{
debug_symbolizer() : symbolizer_base() {}
debug_symbolizer();
debug_symbolizer(debug_symbolizer const& rhs);
debug_symbolizer_mode_e get_mode() const;
void set_mode(debug_symbolizer_mode_e mode);

private:
debug_symbolizer_mode_e mode_;

};

}
Expand Down
4 changes: 2 additions & 2 deletions include/mapnik/expression_evaluator.hpp
Expand Up @@ -57,9 +57,9 @@ struct evaluate : boost::static_visitor<T1>
return attr.value<value_type,feature_type>(feature_);
}

value_type operator() (geometry_type_attribute const& attr) const
value_type operator() (geometry_type_attribute const& geom) const
{
return attr.value<value_type,feature_type>(feature_);
return geom.value<value_type,feature_type>(feature_);
}

value_type operator() (binary_node<tags::logical_and> const & x) const
Expand Down
1 change: 1 addition & 0 deletions include/mapnik/expression_grammar.hpp
Expand Up @@ -24,6 +24,7 @@
#define MAPNIK_EXPRESSIONS_GRAMMAR_HPP

// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/expression_node.hpp>
Expand Down
14 changes: 12 additions & 2 deletions include/mapnik/factory.hpp
Expand Up @@ -40,7 +40,7 @@ class default_factory_error
{
const char* what() const throw()
{
return "uknown object type";
return "unknown object type";
}
};
static product_type* on_unknown_type(const key_type&)
Expand Down Expand Up @@ -83,7 +83,17 @@ class factory : public singleton<factory <product_type,
{
return (pos->second)(file);
}
return factory_error_policy<key_type,product_type>::on_unknown_type(key);
return 0;
}

product_type* create_object(const key_type& key, char const* data, std::size_t size)
{
typename product_map::const_iterator pos=map_.find(key);
if (pos!=map_.end())
{
return (pos->second)(data, size);
}
return 0;
}
};
}
Expand Down
7 changes: 4 additions & 3 deletions include/mapnik/feature.hpp
Expand Up @@ -87,8 +87,8 @@ class context : private mapnik::noncopyable
map_type mapping_;
};

typedef MAPNIK_DECL context<std::map<std::string,std::size_t> > context_type;
typedef MAPNIK_DECL boost::shared_ptr<context_type> context_ptr;
typedef context<std::map<std::string,std::size_t> > context_type;
typedef boost::shared_ptr<context_type> context_ptr;

static const value default_value;

Expand Down Expand Up @@ -306,9 +306,10 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f)
return out;
}

// TODO - remove at Mapnik 3.x
typedef feature_impl Feature;

typedef MAPNIK_DECL boost::shared_ptr<Feature> feature_ptr;
typedef boost::shared_ptr<feature_impl> feature_ptr;

}

Expand Down
8 changes: 4 additions & 4 deletions include/mapnik/feature_factory.hpp
Expand Up @@ -35,11 +35,11 @@ namespace mapnik
{
struct feature_factory
{
static boost::shared_ptr<Feature> create (context_ptr const& ctx, mapnik::value_integer fid)
static boost::shared_ptr<feature_impl> create (context_ptr const& ctx, mapnik::value_integer fid)
{
//return boost::allocate_shared<Feature>(boost::pool_allocator<Feature>(),fid);
//return boost::allocate_shared<Feature>(boost::fast_pool_allocator<Feature>(),fid);
return boost::make_shared<Feature>(ctx,fid);
//return boost::allocate_shared<feature_impl>(boost::pool_allocator<feature_impl>(),fid);
//return boost::allocate_shared<feature_impl>(boost::fast_pool_allocator<feature_impl>(),fid);
return boost::make_shared<feature_impl>(ctx,fid);
}
};
}
Expand Down
3 changes: 2 additions & 1 deletion include/mapnik/feature_style_processor.hpp
Expand Up @@ -25,6 +25,7 @@

// mapnik
#include <mapnik/datasource.hpp> // for featureset_ptr
#include <mapnik/config.hpp>

// stl
#include <set>
Expand All @@ -48,7 +49,7 @@ enum eAttributeCollectionPolicy
};

template <typename Processor>
class feature_style_processor
class MAPNIK_DECL feature_style_processor
{
struct symbol_dispatch;
public:
Expand Down

0 comments on commit 2e134f6

Please sign in to comment.