source: NonGTP/Boost/boost/algorithm/string/std/rope_traits.hpp @ 857

Revision 857, 3.4 KB checked in by igarcia, 18 years ago (diff)
Line 
1//  Boost string_algo library string_traits.hpp header file  ---------------------------//
2
3//  Copyright Pavol Droba 2002-2003. Use, modification and
4//  distribution is subject to the Boost Software License, Version
5//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
6//  http://www.boost.org/LICENSE_1_0.txt)
7
8//  See http://www.boost.org for updates, documentation, and revision history.
9
10#ifndef BOOST_STRING_STD_ROPE_TRAITS_HPP
11#define BOOST_STRING_STD_ROPE_TRAITS_HPP
12
13#include <boost/algorithm/string/yes_no_type.hpp>
14#include <rope>
15#include <boost/algorithm/string/sequence_traits.hpp>
16
17namespace boost {
18    namespace algorithm {
19
20//  SGI's std::rope<> traits  -----------------------------------------------//
21
22#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
23
24        // native replace tester
25        template<typename T, typename TraitsT, typename AllocT>
26        yes_type has_native_replace_tester( const std::rope<T, TraitsT, AllocT>* );
27
28        // stable iterators tester
29        template<typename T, typename TraitsT, typename AllocT>
30        yes_type has_stable_iterators_tester( const std::rope<T, TraitsT, AllocT>* );
31
32        // const time insert tester
33        template<typename T, typename TraitsT, typename AllocT>
34        yes_type has_const_time_insert_tester( const std::rope<T, TraitsT, AllocT>* );
35
36        // const time erase tester
37        template<typename T, typename TraitsT, typename AllocT>
38        yes_type has_const_time_erase_tester( const std::rope<T, TraitsT, AllocT>* );
39
40#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
41   
42    // native replace trait
43        template<typename T, typename TraitsT, typename AllocT>
44        class has_native_replace< std::rope<T,TraitsT,AllocT> >
45        {
46        public:
47#if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
48            enum { value = true };
49#else
50            BOOST_STATIC_CONSTANT(bool, value=true);
51#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
52            typedef mpl::bool_<value> type;     
53        };
54
55    // stable iterators trait
56        template<typename T, typename TraitsT, typename AllocT>
57        class has_stable_iterators< std::rope<T,TraitsT,AllocT> >
58        {
59        public:
60#if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
61            enum { value = true };
62#else
63            BOOST_STATIC_CONSTANT(bool, value=true);
64#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
65            typedef mpl::bool_<value> type;     
66        };
67
68    // const time insert trait
69        template<typename T, typename TraitsT, typename AllocT>
70        class has_const_time_insert< std::rope<T,TraitsT,AllocT> >
71        {
72        public:
73#if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
74            enum { value = true };
75#else
76            BOOST_STATIC_CONSTANT(bool, value=true);
77#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
78            typedef mpl::bool_<value> type;     
79        };
80
81    // const time erase trait
82        template<typename T, typename TraitsT, typename AllocT>
83        class has_const_time_erase< std::rope<T,TraitsT,AllocT> >
84        {
85        public:
86#if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
87            enum { value = true };
88#else
89            BOOST_STATIC_CONSTANT(bool, value=true);
90#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
91            typedef mpl::bool_<value> type;     
92        };
93#endif
94
95
96    } // namespace algorithm
97} // namespace boost
98
99
100#endif  // BOOST_STRING_ROPE_TRAITS_HPP
Note: See TracBrowser for help on using the repository browser.