epoc32/include/stdapis/stlport/stl/_ctraits_fns.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/stl/_ctraits_fns.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/stl/_ctraits_fns.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,95 @@
     1.4 -_ctraits_fns.h
     1.5 +/*
     1.6 + * Copyright (c) 1999
     1.7 + * Silicon Graphics Computer Systems, Inc.
     1.8 + *
     1.9 + * Permission to use, copy, modify, distribute and sell this software
    1.10 + * and its documentation for any purpose is hereby granted without fee,
    1.11 + * provided that the above copyright notice appear in all copies and
    1.12 + * that both that copyright notice and this permission notice appear
    1.13 + * in supporting documentation.  Silicon Graphics makes no
    1.14 + * representations about the suitability of this software for any
    1.15 + * purpose.  It is provided "as is" without express or implied warranty.
    1.16 + */ 
    1.17 +
    1.18 +// WARNING: This is an internal header file, included by other C++
    1.19 +// standard library headers.  You should not attempt to use this header
    1.20 +// file directly.
    1.21 +
    1.22 +#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
    1.23 +#define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
    1.24 +
    1.25 +# ifndef _STLP_INTERNAL_FUNCTION_H 
    1.26 +#  include <stl/_function_base.h>
    1.27 +# endif
    1.28 +
    1.29 +// This file contains a few small adapters that allow a character
    1.30 +// traits class to be used as a function object.
    1.31 +
    1.32 +_STLP_BEGIN_NAMESPACE
    1.33 +
    1.34 +template <class _Traits>
    1.35 +struct _Eq_traits
    1.36 +  : public binary_function<typename _Traits::char_type,
    1.37 +                           typename _Traits::char_type,
    1.38 +                           bool>
    1.39 +{
    1.40 +  bool operator()(const typename _Traits::char_type& __x,
    1.41 +                  const typename _Traits::char_type& __y) const
    1.42 +    { return _Traits::eq(__x, __y); }
    1.43 +};
    1.44 +
    1.45 +template <class _Traits>
    1.46 +struct _Eq_char_bound
    1.47 +  : public unary_function<typename _Traits::char_type, bool>
    1.48 +{
    1.49 +  typename _Traits::char_type __val;
    1.50 +  _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
    1.51 +  bool operator()(const typename _Traits::char_type& __x) const
    1.52 +    { return _Traits::eq(__x, __val); }
    1.53 +};
    1.54 +
    1.55 +template <class _Traits>
    1.56 +struct _Neq_char_bound
    1.57 +  : public unary_function<typename _Traits::char_type, bool>
    1.58 +{
    1.59 +  typename _Traits::char_type __val;
    1.60 +  _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
    1.61 +  bool operator()(const typename _Traits::char_type& __x) const
    1.62 +    { return !_Traits::eq(__x, __val); }
    1.63 +};
    1.64 +
    1.65 +template <class _Traits>
    1.66 +struct _Eq_int_bound
    1.67 +  : public unary_function<typename _Traits::char_type, bool>
    1.68 +{
    1.69 +  typename _Traits::int_type __val;
    1.70 +
    1.71 +  _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {}
    1.72 +  bool operator()(const typename _Traits::char_type& __x) const
    1.73 +    { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); }
    1.74 +};
    1.75 +
    1.76 +# if 0
    1.77 +template <class _Traits>
    1.78 +struct _Lt_traits
    1.79 +  : public binary_function<typename _Traits::char_type,
    1.80 +                           typename _Traits::char_type,
    1.81 +                           bool>
    1.82 +{
    1.83 +  bool operator()(const typename _Traits::char_type& __x,
    1.84 +                  const typename _Traits::char_type& __y) const
    1.85 +    { return _Traits::lt(__x, __y); }
    1.86 +};
    1.87 +# endif
    1.88 +
    1.89 +_STLP_END_NAMESPACE
    1.90 +
    1.91 +#endif /* _STLP_INTERNAL_CTRAITS_FUNCTIONS_H */
    1.92 +
    1.93 +// Local Variables:
    1.94 +// mode:C++
    1.95 +// End:
    1.96 +
    1.97 +
    1.98 +
    1.99 +