Chris@16: /*-----------------------------------------------------------------------------+ Chris@16: Author: Joachim Faulhaber Chris@16: Copyright (c) 2009-2010: Joachim Faulhaber Chris@16: +------------------------------------------------------------------------------+ Chris@16: Distributed under the Boost Software License, Version 1.0. Chris@16: (See accompanying file LICENCE.txt or copy at Chris@16: http://www.boost.org/LICENSE_1_0.txt) Chris@16: +-----------------------------------------------------------------------------*/ Chris@16: /*-----------------------------------------------------------------------------+ Chris@16: Template parameters of major itl class templates can be designed as Chris@16: template template parameters or Chris@16: template type parameter Chris@16: by setting defines in this file. Chris@16: +-----------------------------------------------------------------------------*/ Chris@16: #ifndef BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214 Chris@16: #define BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214 Chris@16: Chris@16: // If this macro is defined, right_open_interval with static interval borders Chris@16: // will be used as default for all interval containers. Chris@16: // BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS should be defined in the application Chris@16: // before other includes from the ITL Chris@16: //#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS Chris@16: // If BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS is NOT defined, ITL uses intervals Chris@16: // with dynamic borders as default. Chris@16: Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: // Auxiliary macros for denoting template signatures. Chris@16: // Purpose: Chris@16: // (1) Shorten the lenthy and redundant template signatures. Chris@16: // (2) Name anonymous template types according to their meaning ... Chris@16: // (3) Making easier to refactor by redefinitin of the macros Chris@16: // (4) Being able to check template template parameter variants against Chris@16: // template type parameter variants. Chris@16: Chris@16: #define ICL_USE_COMPARE_TEMPLATE_TEMPLATE Chris@16: #define ICL_USE_COMBINE_TEMPLATE_TEMPLATE Chris@16: #define ICL_USE_SECTION_TEMPLATE_TEMPLATE Chris@16: // ICL_USE_INTERVAL_TEMPLATE_TYPE Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: // template parameter Compare can not be a template type parameter as long as Chris@16: // Compare >() is called in std::lexicographical_compare Chris@16: // implementing operator< for interval_base_{set,map}. see NOTE DESIGN TTP Chris@16: #ifdef ICL_USE_COMPARE_TEMPLATE_TEMPLATE Chris@16: # define ICL_COMPARE templateclass Chris@16: # define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare Chris@16: # define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance Chris@16: # define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than Chris@16: #else//ICL_USE_COMPARE_TEMPLATE_TYPE Chris@16: # define ICL_COMPARE class Chris@16: # define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare Chris@16: # define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance Chris@16: # define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than Chris@16: #endif Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: // template parameter Combine could be a template type parameter. Chris@16: #ifdef ICL_USE_COMBINE_TEMPLATE_TEMPLATE Chris@16: # define ICL_COMBINE templateclass Chris@16: # define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine Chris@16: # define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance Chris@16: #else//ICL_USE_COMBINE_TEMPLATE_TYPE Chris@16: # define ICL_COMBINE class Chris@16: # define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine Chris@16: # define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance Chris@16: #endif Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: // template parameter Section could be a template type parameter. Chris@16: #ifdef ICL_USE_SECTION_TEMPLATE_TEMPLATE Chris@16: # define ICL_SECTION templateclass Chris@16: # define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect Chris@16: # define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance Chris@16: #else//ICL_USE_SECTION_TEMPLATE_TYPE Chris@16: # define ICL_SECTION class Chris@16: # define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect Chris@16: # define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance Chris@16: #endif Chris@16: Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: // template parameter Interval could be a template type parameter. Chris@16: #ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE Chris@16: # define ICL_INTERVAL(itl_compare) templateclass Chris@16: # define ICL_INTERVAL2(itl_compare) templateclass Chris@16: # define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval Chris@16: # define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) interval_instance Chris@16: #else//ICL_USE_INTERVAL_TEMPLATE_TYPE Chris@16: # define ICL_INTERVAL(itl_compare) class Chris@16: # define ICL_INTERVAL2(itl_compare) class Chris@16: # define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval Chris@16: # define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) typename interval_instance::type Chris@16: #endif Chris@16: Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: #define ICL_ALLOC templateclass Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: #define ICL_INTERVAL_DEFAULT boost::icl::interval_type_default Chris@16: Chris@16: #ifndef BOOST_ICL_USE_COMPARE_STD_GREATER Chris@16: # define ICL_COMPARE_DEFAULT std::less Chris@16: #else Chris@16: # define ICL_COMPARE_DEFAULT std::greater Chris@16: #endif Chris@16: Chris@16: //------------------------------------------------------------------------------ Chris@16: Chris@16: #endif // BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214 Chris@16: Chris@16: