cttl::edge_replace< PolicyT, StringT > Struct Template Reference

Substring replacer. More...

#include <edge_functors.h>

List of all members.

Public Member Functions

 edge_replace (StringT const &str_)
 Constructs function object and initializes it with the source substring.
void operator() (edge< PolicyT, StringT > &edge_)
 Function call operator, replaces substring with the string specified when the function object was constructed.

Public Attributes

StringT m_str
 Stores source string to replace targets.


Detailed Description

template<typename PolicyT = policy_default, typename StringT = CTTL_STD_STRING>
struct cttl::edge_replace< PolicyT, StringT >

Substring replacer.

Function object, which, if called as a function, replaces substring with the string specified when the function object was constructed.

Template Parameters:
PolicyT specifies space policy. The default policy is cttl::policy_default.
StringT specifies type of the encapsulated string. The default is std::string

Definition at line 68 of file edge_functors.h.


Constructor & Destructor Documentation

template<typename PolicyT = policy_default, typename StringT = CTTL_STD_STRING>
cttl::edge_replace< PolicyT, StringT >::edge_replace ( StringT const &  str_  ) 

Constructs function object and initializes it with the source substring.

Definition at line 71 of file edge_functors.h.

00072             :
00073         m_str( str_ )
00074         {
00075         }


Member Function Documentation

template<typename PolicyT = policy_default, typename StringT = CTTL_STD_STRING>
void cttl::edge_replace< PolicyT, StringT >::operator() ( edge< PolicyT, StringT > &  edge_  ) 

Function call operator, replaces substring with the string specified when the function object was constructed.

Definition at line 82 of file edge_functors.h.

00083         {
00084             edge_.text( m_str );
00085         }


Member Data Documentation

template<typename PolicyT = policy_default, typename StringT = CTTL_STD_STRING>
StringT cttl::edge_replace< PolicyT, StringT >::m_str

Stores source string to replace targets.

Definition at line 88 of file edge_functors.h.


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

Generated on Sun Aug 23 13:43:44 2009 for Common Text Transformation Library by  doxygen 1.5.9