File indexing completed on 2025-01-18 09:51:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
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
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 }
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