00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00026
00037
00038
00039 #ifndef _CTTL_NODE_FUNCTORS_H_INCLUDED_
00040 #define _CTTL_NODE_FUNCTORS_H_INCLUDED_
00041
00042 #include "node.h"
00043
00044 namespace cttl {
00045
00046
00060 template< typename StringT = CTTL_STD_STRING >
00061 struct node_insert_go : public std::unary_function< node< StringT >, void >
00062 {
00064 node_insert_go( StringT const& str_ )
00065 :
00066 m_str( str_ )
00067 {
00068 }
00069
00079 void operator() ( node< StringT >& node_ )
00080 {
00081 node_.insert_go( m_str );
00082 }
00083
00085 StringT m_str;
00086 };
00087
00101 template< typename StringT = CTTL_STD_STRING >
00102 struct node_insert_stay : public std::unary_function< node< StringT >, void >
00103 {
00105 node_insert_stay( StringT const& str_ )
00106 :
00107 m_str( str_ )
00108 {
00109 }
00110
00120 void operator() ( node< StringT >& node_ )
00121 {
00122 node_.insert_stay( m_str );
00123 }
00124
00126 StringT m_str;
00127 };
00128
00129
00130 }
00131
00132 #endif // _CTTL_NODE_FUNCTORS_H_INCLUDED_