#include <factory_filter.hpp>
Definition at line 33 of file factory_filter.hpp.
◆ CreateFilterCallback
typedef metaproxy_1::filter::Base*(* metaproxy_1::FactoryFilter::CreateFilterCallback) () |
|
private |
◆ FactoryFilter()
metaproxy_1::FactoryFilter::FactoryFilter |
( |
| ) |
|
◆ ~FactoryFilter()
metaproxy_1::FactoryFilter::~FactoryFilter |
( |
| ) |
|
◆ add_creator()
◆ add_creator_dl()
bool metaproxy_1::FactoryFilter::add_creator_dl |
( |
const std::string & |
fi, |
|
|
const std::string & |
path |
|
) |
| |
Definition at line 104 of file factory_filter.cpp.
108 if (
m_p->m_fcm.find(fi) !=
m_p->m_fcm.end())
112 std::string full_name =
"metaproxy_1_filter_" + fi;
114 void *dl_handle = dlopen(0, RTLD_GLOBAL|RTLD_NOW);
115 void *dlsym_ptr = dlsym(dl_handle, full_name.c_str());
119 std::string full_path = path +
"/metaproxy_filter_" + fi +
".so";
120 dl_handle = dlopen(full_path.c_str(), RTLD_GLOBAL|RTLD_NOW);
123 const char *dl = dlerror();
124 std::cout <<
"dlopen " << full_path <<
" failed. dlerror=" << dl <<
128 dlsym_ptr = dlsym(dl_handle, full_name.c_str());
132 std::cout <<
"dlsym " << full_name <<
" failed\n";
135 struct metaproxy_1_filter_struct *s = (
struct metaproxy_1_filter_struct *) dlsym_ptr;
◆ create()
mp::filter::Base * metaproxy_1::FactoryFilter::create |
( |
std::string |
fi | ) |
|
Definition at line 92 of file factory_filter.cpp.
94 Rep::CallbackMap::const_iterator it =
m_p->m_fcm.find(fi);
96 if (it ==
m_p->m_fcm.end()){
97 std::string msg =
"filter type '" + fi +
"' not found";
101 return (it->second());
◆ drop_creator()
bool metaproxy_1::FactoryFilter::drop_creator |
( |
std::string |
fi | ) |
|
◆ exist()
bool metaproxy_1::FactoryFilter::exist |
( |
std::string |
fi | ) |
|
Definition at line 81 of file factory_filter.cpp.
83 Rep::CallbackMap::const_iterator it =
m_p->m_fcm.find(fi);
85 if (it ==
m_p->m_fcm.end())
◆ m_p
boost::scoped_ptr<Rep> metaproxy_1::FactoryFilter::m_p |
|
private |
The documentation for this class was generated from the following files: