From 9ca11feb9062e170d477139513670f34070911ad Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 9 Mar 2014 22:24:09 +0100 Subject: [PATCH] relate() static_mask and static_mask_handler implemented --- .../algorithms/detail/relate/relate.hpp | 17 + .../algorithms/detail/relate/result.hpp | 372 ++++++++---------- 2 files changed, 189 insertions(+), 200 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/relate/relate.hpp b/include/boost/geometry/algorithms/detail/relate/relate.hpp index 4359a0926..831858ae1 100644 --- a/include/boost/geometry/algorithms/detail/relate/relate.hpp +++ b/include/boost/geometry/algorithms/detail/relate/relate.hpp @@ -167,6 +167,23 @@ struct result_handler_type > type; }; +template +struct result_handler_type > +{ + typedef static_mask_handler + < + static_mask, + interruption_enabled + < + Geometry1, + Geometry2 + >::value + > type; +}; + template inline typename result_handler_type diff --git a/include/boost/geometry/algorithms/detail/relate/result.hpp b/include/boost/geometry/algorithms/detail/relate/result.hpp index b2b2db077..03b7ee78f 100644 --- a/include/boost/geometry/algorithms/detail/relate/result.hpp +++ b/include/boost/geometry/algorithms/detail/relate/result.hpp @@ -2,8 +2,8 @@ // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2013. -// Modifications copyright (c) 2013, Oracle and/or its affiliates. +// This file was modified by Oracle on 2013, 2014. +// Modifications copyright (c) 2013, 2014 Oracle and/or its affiliates. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -13,6 +13,8 @@ #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_RESULT_HPP #include +#include +#include namespace boost { namespace geometry { @@ -145,48 +147,6 @@ public: } }; -//template -//struct static_check_element -//{ -// static inline bool apply(char el) -// { -// static const int version -// = MaskEl == 'F' ? 0 -// : MaskEl == 'T' ? 1 -// : MaskEl >= '0' && MaskEl <= '9' ? 2 -// : 3; -// -// return apply_dispatch(el, integral_constant()); -// } -// -// static inline bool apply_dispatch(char el, integral_constant) -// { -// return el == 'F'; -// } -// static inline bool apply_dispatch(char el, integral_constant) -// { -// return el == 'T' || ( el >= '0' && el <= '9' ); -// } -// static inline bool apply_dispatch(char el, integral_constant) -// { -// return el == MaskEl; -// } -// static inline bool apply_dispatch(char el, integral_constant) -// { -// return true; -// } -//}; -// -//template -//struct static_interrupt -//{ -// static const bool value -// = ( V >= '0' && V <= '9' ) ? -// ( MaskEl == 'F' || ( MaskEl < V && MaskEl >= '0' && MaskEl <= '9' ) ) : -// ( ( V == 'T' ) ? MaskEl == 'F' : false ); -// -//}; - // RUN-TIME MASKS class mask9 @@ -403,165 +363,177 @@ private: Mask const& m_mask; }; -// TODO: implement stand-alone mask and static_mask -// separate mask and matrix - needed by complex masks! - store only one matrix! +// STATIC MASK -//template -//class static_mask{}; -// -//template