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

Substring inserter. More...

#include <edge_functors.h>

List of all members.

Public Member Functions

 edge_first_insert_stay (StringT const &str_)
 Constructs function object and initializes it with the source substring.
void operator() (edge< PolicyT, StringT > &edge_)
 Function call operator, inserts string specified when the function object was constructed, at the offset pointed by the upper boundary cttl::const_edge::first.

Public Attributes

StringT m_str
 Stores string to insert.


Detailed Description

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

Substring inserter.

Function object, which, if called as a function, inserts string specified when the function object was constructed, at the offset pointed by the upper boundary cttl::const_edge::first.

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 160 of file edge_functors.h.


Constructor & Destructor Documentation

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

Constructs function object and initializes it with the source substring.

Definition at line 163 of file edge_functors.h.

00164             :
00165         m_str( str_ )
00166         {
00167         }


Member Function Documentation

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

Function call operator, inserts string specified when the function object was constructed, at the offset pointed by the upper boundary cttl::const_edge::first.

Postcondition:
All nodes at higher offset positions are adjusted forward according to the length of the inserted substring.

Definition at line 179 of file edge_functors.h.

00180         {
00181             edge_.first.insert_stay( m_str );
00182         }


Member Data Documentation

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

Stores string to insert.

Definition at line 185 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