Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/icl/detail/design_config.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*-----------------------------------------------------------------------------+
0002 Author: Joachim Faulhaber
0003 Copyright (c) 2009-2010: Joachim Faulhaber
0004 +------------------------------------------------------------------------------+
0005    Distributed under the Boost Software License, Version 1.0.
0006       (See accompanying file LICENCE.txt or copy at
0007            http://www.boost.org/LICENSE_1_0.txt)
0008 +-----------------------------------------------------------------------------*/
0009 /*-----------------------------------------------------------------------------+
0010 Template parameters of major itl class templates can be designed as
0011 template template parameters or
0012 template type parameter
0013 by setting defines in this file.
0014 +-----------------------------------------------------------------------------*/
0015 #ifndef  BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214
0016 #define  BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214
0017 
0018 // If this macro is defined, right_open_interval with static interval borders
0019 // will be used as default for all interval containers. 
0020 // BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS should be defined in the application
0021 // before other includes from the ITL
0022 //#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
0023 // If BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS is NOT defined, ITL uses intervals
0024 // with dynamic borders as default.
0025 
0026 
0027 //------------------------------------------------------------------------------
0028 // Auxiliary macros for denoting template signatures.
0029 // Purpose:
0030 // (1) Shorten the lenthy and redundant template signatures.
0031 // (2) Name anonymous template types according to their meaning ...
0032 // (3) Making easier to refactor by redefinitin of the macros
0033 // (4) Being able to check template template parameter variants against
0034 //     template type parameter variants.
0035 
0036 #define ICL_USE_COMPARE_TEMPLATE_TEMPLATE
0037 #define ICL_USE_COMBINE_TEMPLATE_TEMPLATE
0038 #define ICL_USE_SECTION_TEMPLATE_TEMPLATE
0039 //      ICL_USE_INTERVAL_TEMPLATE_TYPE
0040 
0041 //------------------------------------------------------------------------------
0042 // template parameter Compare can not be a template type parameter as long as
0043 // Compare<Interval<DomainT,Compare> >() is called in std::lexicographical_compare
0044 // implementing operator< for interval_base_{set,map}. see NOTE DESIGN TTP
0045 #ifdef ICL_USE_COMPARE_TEMPLATE_TEMPLATE
0046 #   define ICL_COMPARE template<class>class
0047 #   define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare<domain_type> 
0048 #   define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance
0049 #   define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than
0050 #else//ICL_USE_COMPARE_TEMPLATE_TYPE
0051 #   define ICL_COMPARE class
0052 #   define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare 
0053 #   define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance<domain_type> 
0054 #   define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than<interval_type>
0055 #endif
0056 
0057 //------------------------------------------------------------------------------
0058 // template parameter Combine could be a template type parameter.
0059 #ifdef ICL_USE_COMBINE_TEMPLATE_TEMPLATE
0060 #   define ICL_COMBINE template<class>class
0061 #   define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine<codomain_type> 
0062 #   define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance
0063 #else//ICL_USE_COMBINE_TEMPLATE_TYPE
0064 #   define ICL_COMBINE class
0065 #   define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine 
0066 #   define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance<codomain_type>
0067 #endif
0068 
0069 //------------------------------------------------------------------------------
0070 // template parameter Section could be a template type parameter.
0071 #ifdef ICL_USE_SECTION_TEMPLATE_TEMPLATE
0072 #   define ICL_SECTION template<class>class
0073 #   define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect<codomain_type> 
0074 #   define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance
0075 #else//ICL_USE_SECTION_TEMPLATE_TYPE
0076 #   define ICL_SECTION class
0077 #   define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect 
0078 #   define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance<codomain_type>
0079 #endif
0080 
0081 
0082 //------------------------------------------------------------------------------
0083 // template parameter Interval could be a template type parameter.
0084 #ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE
0085 #   define ICL_INTERVAL(itl_compare) template<class,itl_compare>class
0086 #   define ICL_INTERVAL2(itl_compare) template<class DomT2,itl_compare>class
0087 #   define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval<domain_type,itl_compare> 
0088 #   define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) interval_instance
0089 #else//ICL_USE_INTERVAL_TEMPLATE_TYPE
0090 #   define ICL_INTERVAL(itl_compare) class
0091 #   define ICL_INTERVAL2(itl_compare) class
0092 #   define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval  
0093 #   define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) typename interval_instance<domain_type,itl_compare>::type
0094 #endif
0095 
0096 
0097 //------------------------------------------------------------------------------
0098 #define ICL_ALLOC    template<class>class
0099 
0100 //------------------------------------------------------------------------------
0101 #define ICL_INTERVAL_DEFAULT boost::icl::interval_type_default
0102 
0103 #ifndef BOOST_ICL_USE_COMPARE_STD_GREATER
0104 #   define ICL_COMPARE_DEFAULT std::less
0105 #else
0106 #   define ICL_COMPARE_DEFAULT std::greater
0107 #endif
0108 
0109 //------------------------------------------------------------------------------
0110 
0111 #endif // BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214
0112 
0113