Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:51:25

0001 /*
0002  *
0003  * Copyright (c) 2004
0004  * John Maddock
0005  *
0006  * Use, modification and distribution are subject to the 
0007  * Boost Software License, Version 1.0. (See accompanying file 
0008  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009  *
0010  */
0011 
0012  /*
0013   *   LOCATION:    see http://www.boost.org for most recent version.
0014   *   FILE         basic_regex_creator.cpp
0015   *   VERSION      see <boost/version.hpp>
0016   *   DESCRIPTION: Declares template class basic_regex_creator which fills in
0017   *                the data members of a regex_data object.
0018   */
0019 
0020 #ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP
0021 #define BOOST_REGEX_V4_PROTECTED_CALL_HPP
0022 
0023 #include <boost/config.hpp>
0024 
0025 #ifdef BOOST_MSVC
0026 #pragma warning(push)
0027 #pragma warning(disable: 4103)
0028 #endif
0029 #ifdef BOOST_HAS_ABI_HEADERS
0030 #  include BOOST_ABI_PREFIX
0031 #endif
0032 #ifdef BOOST_MSVC
0033 #pragma warning(pop)
0034 #endif
0035 
0036 namespace boost{
0037 namespace BOOST_REGEX_DETAIL_NS{
0038 
0039 class BOOST_REGEX_DECL abstract_protected_call
0040 {
0041 public:
0042    bool BOOST_REGEX_CALL execute()const;
0043    // this stops gcc-4 from complaining:
0044    virtual ~abstract_protected_call(){}
0045 private:
0046    virtual bool call()const = 0;
0047 };
0048 
0049 template <class T>
0050 class concrete_protected_call
0051    : public abstract_protected_call
0052 {
0053 public:
0054    typedef bool (T::*proc_type)();
0055    concrete_protected_call(T* o, proc_type p)
0056       : obj(o), proc(p) {}
0057 private:
0058    bool call()const BOOST_OVERRIDE;
0059    T* obj;
0060    proc_type proc;
0061 };
0062 
0063 template <class T>
0064 bool concrete_protected_call<T>::call()const
0065 {
0066    return (obj->*proc)();
0067 }
0068 
0069 }
0070 } // namespace boost
0071 
0072 #ifdef BOOST_MSVC
0073 #pragma warning(push)
0074 #pragma warning(disable: 4103)
0075 #endif
0076 #ifdef BOOST_HAS_ABI_HEADERS
0077 #  include BOOST_ABI_SUFFIX
0078 #endif
0079 #ifdef BOOST_MSVC
0080 #pragma warning(pop)
0081 #endif
0082 
0083 #endif