Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::expressions::pattern_replacer< CharT > Class Template Reference

A simple character decorator implementation. More...

#include <char_decorator.hpp>

Inheritance diagram for boost::expressions::pattern_replacer< CharT >:

Public Types

typedef void result_type
 Result type. More...
 
typedef CharT char_type
 Character type. More...
 
typedef std::basic_string
< char_type
string_type
 String type. More...
 

Public Member Functions

template<typename RangeT >
 pattern_replacer (RangeT const &decorations)
 Initializing constructor. More...
 
template<typename FromRangeT , typename ToRangeT >
 pattern_replacer (FromRangeT const &from, ToRangeT const &to)
 Initializing constructor. More...
 
 pattern_replacer (pattern_replacer const &that)
 Copy constructor. More...
 
result_type operator() (string_type &str, typename string_type::size_type start_pos=0) const
 Applies string replacements starting from the specified position. More...
 

Detailed Description

template<typename CharT>
class boost::expressions::pattern_replacer< CharT >

A simple character decorator implementation.

This implementation replaces string patterns in the source string with the fixed replacements. Source patterns and replacements can be specified at the object construction.

Member Typedef Documentation

template<typename CharT >
typedef CharT boost::expressions::pattern_replacer< CharT >::char_type

Character type.

template<typename CharT >
typedef void boost::expressions::pattern_replacer< CharT >::result_type

Result type.

template<typename CharT >
typedef std::basic_string< char_type > boost::expressions::pattern_replacer< CharT >::string_type

String type.

Constructor & Destructor Documentation

template<typename CharT >
template<typename RangeT >
boost::expressions::pattern_replacer< CharT >::pattern_replacer ( RangeT const &  decorations)
inlineexplicit

Initializing constructor.

Creates a pattern replacer with the specified decorations. The provided decorations must be a sequence of std::pair of strings. The first element of each pair is the source pattern, and the second one is the corresponding replacement.

References boost::asio::b, boost::asio::begin, boost::fusion::distance(), boost::end, boost::msm::front::euml::end_, and boost::it.

template<typename CharT >
template<typename FromRangeT , typename ToRangeT >
boost::expressions::pattern_replacer< CharT >::pattern_replacer ( FromRangeT const &  from,
ToRangeT const &  to 
)
inline

Initializing constructor.

Creates a pattern replacer with decorations specified in form of two same-sized string sequences. Each i'th decoration will be from[i] -> to[i].

References boost::asio::b, boost::asio::begin, BOOST_ASSERT, boost::fusion::distance(), and boost::end.

template<typename CharT >
boost::expressions::pattern_replacer< CharT >::pattern_replacer ( pattern_replacer< CharT > const &  that)
inline

Copy constructor.

Member Function Documentation

template<typename CharT >
result_type boost::expressions::pattern_replacer< CharT >::operator() ( string_type str,
typename string_type::size_type  start_pos = 0 
) const
inline

Applies string replacements starting from the specified position.

References boost::end, and boost::it.

Referenced by boost::expressions::c_ascii_pattern_replacer< CharT >::operator()().


The documentation for this class was generated from the following file: