refactor value related objects into include/value dir

This commit is contained in:
artemp 2016-08-02 15:34:59 +01:00
parent 8ce7a1c43d
commit b5c9966e4b
64 changed files with 79 additions and 82 deletions

View file

@ -4,7 +4,7 @@
// mapnik
#include <mapnik/debug.hpp>
#include <mapnik/params.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/safe_cast.hpp>
#include "../test/cleanup.hpp"

View file

@ -24,7 +24,7 @@
#define MAPNIK_ATTRIBUTE_HPP
// mapnik
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
#include <mapnik/util/geometry_to_ds_type.hpp>
// stl

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/attribute.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/expression_node.hpp>
#include <mapnik/function_call.hpp>
#include <mapnik/util/variant.hpp>

View file

@ -27,7 +27,7 @@
#include <mapnik/expression_node.hpp>
#include <mapnik/expression_grammar.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/function_call.hpp>
#pragma GCC diagnostic push

View file

@ -24,7 +24,7 @@
#define MAPNIK_EXPRESSION_NODE_HPP
// mapnik
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
#include <mapnik/config.hpp>
#include <mapnik/unicode.hpp>

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/variant.hpp>
namespace mapnik

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/geometry.hpp>

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/feature.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// boost
//#include <boost/pool/pool_alloc.hpp>

View file

@ -25,7 +25,7 @@
//mapnik
#include <mapnik/text/symbolizer_helpers.hpp>
#include <mapnik/text/placements/base.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/pixel_position.hpp>
namespace mapnik {

View file

@ -23,7 +23,7 @@
#ifndef MAPNIK_GENERIC_JSON_HPP
#define MAPNIK_GENERIC_JSON_HPP
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/variant.hpp>
#include <mapnik/json/value_converters.hpp>

View file

@ -23,7 +23,7 @@
#ifndef MAPNIK_JSON_PROPERTIES_GENERATOR_GRAMMAR_HPP
#define MAPNIK_JSON_PROPERTIES_GENERATOR_GRAMMAR_HPP
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
#pragma GCC diagnostic push

View file

@ -26,7 +26,7 @@
// mapnik
#include <mapnik/quad_tree.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#pragma GCC diagnostic push
#include <mapnik/warning_ignore.hpp>

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/variant.hpp>
#pragma GCC diagnostic push

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/params.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/boolean.hpp>
#include <mapnik/util/conversions.hpp>

View file

@ -30,7 +30,7 @@
#include <mapnik/svg/geometry_svg_generator.hpp>
#include <mapnik/svg/output/svg_output_attributes.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
namespace mapnik { namespace svg {

View file

@ -27,7 +27,7 @@
#include <mapnik/svg/svg_path_attributes.hpp>
#include <mapnik/gradient.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/noncopyable.hpp>
#if defined(GRID_RENDERER)

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/expression.hpp>
#include <mapnik/path_expression.hpp>
#include <mapnik/symbolizer_keys.hpp>

View file

@ -29,7 +29,7 @@
#include <mapnik/image_scaling.hpp>
#include <mapnik/simplify.hpp>
#include <mapnik/color.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <type_traits>

View file

@ -25,7 +25,7 @@
//mapnik
#include <mapnik/text/evaluated_format_properties_ptr.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/config.hpp>

View file

@ -23,7 +23,7 @@
#define MAPNIK_TEXT_LAYOUT_HPP
//mapnik
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/pixel_position.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/attribute.hpp>

View file

@ -26,7 +26,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/attribute.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/expression_node_types.hpp>
#include <mapnik/expression_node.hpp>
#include <mapnik/util/variant.hpp>

View file

@ -26,7 +26,7 @@
//mapnik
#include <mapnik/config.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// std
#include <cstdint>

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// stl
#include <iosfwd>

View file

@ -25,8 +25,8 @@
// mapnik
#include <mapnik/config.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value_hash.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value/hash.hpp>
#include <mapnik/util/variant.hpp>
@ -115,7 +115,7 @@ operator << (std::basic_ostream<charT,traits>& out,
// hash function
inline std::size_t hash_value(value const& val)
{
return mapnik_hash_value(val);
return mapnik::value_hash(val);
}
} // namespace value_adl_barrier
@ -157,7 +157,7 @@ struct hash<mapnik::value>
{
size_t operator()(mapnik::value const& val) const
{
return mapnik::mapnik_hash_value(val);
return mapnik::value_hash(val);
}
};

View file

@ -28,20 +28,19 @@
#include <exception>
#include <string>
namespace mapnik {
namespace mapnik { namespace value {
class value_error : public std::exception
class error : public std::exception
{
public:
value_error() :
error() :
what_() {}
value_error( std::string const& what ) :
error( std::string const& what ) :
what_( what )
{
}
{}
virtual ~value_error() throw() {}
virtual ~error() throw() {}
virtual const char * what() const throw()
{
@ -56,6 +55,7 @@ public:
protected:
mutable std::string what_;
};
}
}}
#endif // MAPNIK_VALUE_ERROR_HPP

View file

@ -25,7 +25,7 @@
// mapnik
#include <mapnik/util/variant.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// stl
#include <functional>
@ -35,7 +35,9 @@
#pragma GCC diagnostic pop
namespace mapnik { namespace detail {
namespace mapnik {
namespace detail {
inline void hash_combine(std::size_t & seed, std::size_t val)
{
@ -70,7 +72,7 @@ struct value_hasher
} // namespace detail
template <typename T>
std::size_t mapnik_hash_value(T const& val)
std::size_t value_hash(T const& val)
{
std::size_t seed = 0;
detail::hash_combine(seed, util::apply_visitor(detail::value_hasher(), val));

View file

@ -32,7 +32,7 @@
#include <mapnik/simplify.hpp>
#include <mapnik/simplify_converter.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/symbolizer_enumerations.hpp>
#include <mapnik/symbolizer_keys.hpp>
#include <mapnik/symbolizer.hpp>

View file

@ -25,7 +25,7 @@
//mapnik
#include <mapnik/debug.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/xml_tree.hpp>
#include <mapnik/enumeration.hpp>
#include <mapnik/boolean.hpp>

View file

@ -40,7 +40,7 @@
#include <mapnik/geometry.hpp>
#include <mapnik/geometry/boost_adapters.hpp>
#include <mapnik/util/geometry_to_ds_type.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/fs.hpp>
#include <mapnik/make_unique.hpp>
#include <mapnik/util/spatial_index.hpp>

View file

@ -31,7 +31,7 @@
#include <mapnik/box2d.hpp>
#include <mapnik/coord.hpp>
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include "csv_utils.hpp"
#pragma GCC diagnostic push

View file

@ -26,7 +26,7 @@
// mapnik
#include <mapnik/box2d.hpp>
#include <mapnik/geometry.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/conversions.hpp>
#include <mapnik/util/trim.hpp>
#include <mapnik/csv/csv_types.hpp>

View file

@ -28,7 +28,7 @@
#include <mapnik/boolean.hpp>
#include <mapnik/geom_util.hpp>
#include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <gdal_version.h>

View file

@ -40,7 +40,7 @@
#include <mapnik/feature.hpp>
#include <mapnik/feature_factory.hpp>
#include <mapnik/feature_kv_iterator.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/proj_transform.hpp>

View file

@ -22,14 +22,14 @@
// mapnik
#include <mapnik/global.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/feature.hpp>
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/wkb.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/feature_factory.hpp>
#include <mapnik/geometry/correct.hpp>

View file

@ -21,7 +21,7 @@
*****************************************************************************/
// mapnik
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/global.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/box2d.hpp>

View file

@ -36,7 +36,7 @@
#include <mapnik/sql_utils.hpp>
#include <mapnik/util/conversions.hpp>
#include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#pragma GCC diagnostic push
#include <mapnik/warning_ignore.hpp>

View file

@ -36,7 +36,7 @@
#include <mapnik/coord.hpp>
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// boost
#include <boost/optional.hpp>

View file

@ -34,7 +34,7 @@
#include <mapnik/global.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/feature_factory.hpp>
#include <mapnik/view_transform.hpp>
#include <mapnik/raster.hpp>

View file

@ -33,7 +33,7 @@
#include <mapnik/sql_utils.hpp>
#include <mapnik/util/conversions.hpp>
#include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#pragma GCC diagnostic push
#include <mapnik/warning_ignore.hpp>

View file

@ -32,7 +32,7 @@
#include <mapnik/coord.hpp>
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/attribute.hpp>
// boost

View file

@ -30,7 +30,7 @@
#include <mapnik/debug.hpp>
#include <mapnik/wkb.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/feature_factory.hpp>
#include <mapnik/util/conversions.hpp>
#include <mapnik/util/trim.hpp>

View file

@ -20,7 +20,7 @@
*
*****************************************************************************/
// mapnik
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/global.hpp>
#include <mapnik/util/utf_conv_win.hpp>
#include <mapnik/unicode.hpp>

View file

@ -40,7 +40,7 @@
#include <mapnik/util/conversions.hpp>
#include <mapnik/geom_util.hpp>
#include <mapnik/timer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// stl
#include <fstream>

View file

@ -31,7 +31,7 @@
#include <mapnik/box2d.hpp>
#include <mapnik/coord.hpp>
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// boost
#include <boost/optional.hpp>

View file

@ -28,7 +28,7 @@
#include <mapnik/geom_util.hpp>
#include <mapnik/feature.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include "shape_io.hpp"

View file

@ -31,7 +31,7 @@
#include <mapnik/geom_util.hpp>
#include <mapnik/feature.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// boost

View file

@ -32,7 +32,7 @@
#include <mapnik/coord.hpp>
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/wkb.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// boost
#include <boost/optional.hpp>

View file

@ -28,7 +28,7 @@
#include <mapnik/feature_layer_desc.hpp>
#include <mapnik/wkb.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/feature_factory.hpp>
#include <mapnik/geometry/is_empty.hpp>
#include <mapnik/geometry/envelope.hpp>

View file

@ -31,7 +31,7 @@
// mapnik
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/box2d.hpp>
#include <mapnik/geometry/boost_adapters.hpp>
#include <mapnik/json/topojson_grammar.hpp>

View file

@ -22,7 +22,7 @@
// mapnik
#include <mapnik/util/conversions.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <cstring>
#include <algorithm>

View file

@ -21,7 +21,7 @@
*****************************************************************************/
#include <mapnik/expression_node.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/noncopyable.hpp>
#include <mapnik/safe_cast.hpp>

View file

@ -27,7 +27,7 @@
#include <mapnik/expression_node_types.hpp>
#include <mapnik/expression_node.hpp>
#include <mapnik/attribute.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
namespace mapnik

View file

@ -28,7 +28,7 @@
#include <mapnik/vertex_processor.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/text/placements/base.hpp>
#include <mapnik/text/placements/dummy.hpp>
#include <mapnik/vertex_cache.hpp>

View file

@ -24,7 +24,7 @@
#include <mapnik/boolean.hpp>
#include <mapnik/params.hpp>
#include <mapnik/params_impl.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
namespace mapnik {

View file

@ -22,7 +22,7 @@
// mapnik
#include <mapnik/debug.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp> // for to_double
#include <mapnik/feature.hpp>
#include <mapnik/raster.hpp>

View file

@ -36,7 +36,7 @@
#include <mapnik/parse_path.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/text/placement_finder_impl.hpp>
#include <mapnik/text/placements/base.hpp>
#include <mapnik/text/placements/dummy.hpp>

View file

@ -22,7 +22,7 @@
// mapnik
#include <mapnik/unicode.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
// std
#include <stdexcept>

View file

@ -22,7 +22,7 @@
// mapnik
#include <mapnik/value.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/util/conversions.hpp>
// stl

View file

@ -1,7 +1,6 @@
#include "catch.hpp"
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
TEST_CASE("comparison")

View file

@ -1,7 +1,6 @@
#include "catch.hpp"
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/util/conversions.hpp>

View file

@ -1,8 +1,7 @@
#include "catch.hpp"
#include <iostream>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/params.hpp>
#include <mapnik/boolean.hpp>

View file

@ -1,7 +1,6 @@
#include "catch.hpp"
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/value.hpp>
TEST_CASE("mapnik::value")

View file

@ -1,4 +1,3 @@
#include "catch.hpp"
#include <mapnik/memory_datasource.hpp>
@ -12,7 +11,7 @@
#include <mapnik/rule.hpp>
#include <mapnik/feature_type_style.hpp>
#include <mapnik/agg_renderer.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/value/types.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/text/placements/dummy.hpp>
#include <mapnik/text/formatting/text.hpp>
@ -69,4 +68,4 @@ SECTION("error") {
REQUIRE(std::string(ex.what()) == std::string("Unable to find specified font face 'DejaVu Sans Book' in font set: 'fontset'"));
}
}
}
}