00001
00018 #ifndef BS_STR_FUNCTOR_H_
00019 #define BS_STR_FUNCTOR_H_
00020
00021 namespace blue_sky
00022 {
00023
00025 template <typename T>
00026 struct str_functor
00027 {
00028 typedef void (T::*method_t)(const char*, const char*);
00029 typedef T self_t;
00030
00031 str_functor (self_t *self, method_t method)
00032 : self (self)
00033 , method (method)
00034 {
00035 }
00036
00037 void operator()(const char *first, const char *last) const
00038 {
00039 (self->*method)(first, last);
00040 }
00041
00042 self_t *self;
00043 method_t method;
00044 };
00045
00046 }
00047
00048 #endif // #ifndef BS_STR_FUNCTOR_H_
00049