A simple character decorator implementation. More...
#include <char_decorator.hpp>
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... | |
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.
typedef CharT boost::expressions::pattern_replacer< CharT >::char_type |
Character type.
typedef void boost::expressions::pattern_replacer< CharT >::result_type |
Result type.
typedef std::basic_string< char_type > boost::expressions::pattern_replacer< CharT >::string_type |
String type.
|
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.
|
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.
|
inline |
Copy constructor.
|
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()().