Sha256: 011d4ba10dc89e3cc73cc9d45d304fa85054447c39ecfde4bb59dc881ecad4b2

Contents?: true

Size: 1.95 KB

Versions: 56

Compression:

Stored size: 1.95 KB

Contents

//  Boost string_algo library formatter_regex.hpp header file  ---------------------------//

//  Copyright Pavol Droba 2002-2003.
//
// Distributed under the Boost Software License, Version 1.0.
//    (See accompanying file LICENSE_1_0.txt or copy at
//          http://www.boost.org/LICENSE_1_0.txt)

//  See http://www.boost.org/ for updates, documentation, and revision history.

#ifndef BOOST_STRING_FORMATTER_REGEX_DETAIL_HPP
#define BOOST_STRING_FORMATTER_REGEX_DETAIL_HPP

#include <boost/algorithm/string/config.hpp>
#include <string>
#include <boost/regex.hpp>
#include <boost/algorithm/string/detail/finder_regex.hpp>

namespace boost {
    namespace algorithm {
        namespace detail {

//  regex format functor -----------------------------------------//

            // regex format functor
            template<typename StringT>
            struct regex_formatF
            {
            private:
                typedef StringT result_type;
                typedef BOOST_STRING_TYPENAME StringT::value_type char_type;

            public:
                // Construction
                regex_formatF( const StringT& Fmt, match_flag_type Flags=format_default ) :
                    m_Fmt(Fmt), m_Flags( Flags ) {}

                template<typename InputIteratorT>
                result_type operator()( 
                    const regex_search_result<InputIteratorT>& Replace ) const
                {
                    if ( Replace.empty() )
                    {
                        return result_type();
                    }
                    else
                    {
                        return Replace.match_results().format( m_Fmt, m_Flags );                      
                    }
                }
            private:
                const StringT& m_Fmt;
                match_flag_type m_Flags;
            };

        
        } // namespace detail
    } // namespace algorithm
} // namespace boost

#endif  // BOOST_STRING_FORMATTER_DETAIL_HPP

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
passenger-5.1.7 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.6 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.5 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.4 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.3 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.2 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.1 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.1.0 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.0.30 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.0.29 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/passenger-5.0.28/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.0.28 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.0.27 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.0.26 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
passenger-5.0.25 src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp
buncher-1.0.5 ext/boost/1.57.0/include/boost//algorithm/string/detail/formatter_regex.hpp