33 std::vector<identification>::const_iterator iter;
37 if ( 0==name.compare( iter->first ) ){
44 if ( 0==name.compare( iter->first ) ){
56 std::vector<std::string> list;
57 std::vector<identification>::const_iterator iter;
61 list.push_back ( iter->first );
66 list.push_back ( iter->first );
76 info(
"Symbols found in dll "+
name()+
": "+
79 std::vector<identification>::const_iterator iter;
81 sprintf(line,
"============================================================================================");
82 info(line,
"DLL::print");
83 sprintf(line ,
"Element Description");
84 info(line,
"DLL::print");
88 sprintf(line,
" %25s %65s ",
90 iter->second.c_str());
91 info(std::string(line),
"DLL::print");
95 sprintf(line,
"============================================================================================");
96 info(line,
"DLL::print");
97 sprintf (line ,
"Processus Target Type");
98 info(line,
"DLL::print");
102 sprintf(line,
" %25s %25s ",
107 info(std::string(line),
"DLL::print");
110 sprintf(line,
"============================================================================================");
111 info(line,
"DLL::print");
121 m_handle = LoadLibrary ((library+std::string(
".dll")).c_str());
123 m_handle = dlopen( (std::string(
"lib")+library+std::string(
".so")).c_str() , RTLD_LAZY );
125 if ( NULL != m_handle ) {
132 (library+std::string(
"_dll")).c_str());
135 (library+std::string(
"_dll")).c_str());
138 warning(
"No entry point found in library "+library+
".",
"DLL::load");
141 FreeLibrary( m_handle );
145 warning(
"Could not load dll entry point "+
name(),
"DLL::load");
149 debug(
"Entry point found in library "+library+
".",
"DLL::load");
153 if (
init().isFailure() ) {
154 info(
"Could not find Constructors/Destructors in library "+
155 library+
".",
"DLL::load");
163 warning(
"No handle on library "+library+
".",
"DLL::load");
174 std::vector<identification>::const_iterator iter;
183 std::string(
"_create")).c_str());
186 std::string(
"_destroy")).c_str());
190 std::string(
"_create")).c_str());
193 std::string(
"_destroy")).c_str());
195 if ( 0 == constructor) {
196 warning(
"Could not find constructor of "+iter->first+std::string(
" (_create)"),
"DLL::init");
199 if ( 0 == destructor) {
200 warning(
"Could not find destructor of "+iter->first+std::string(
" (_destroy)"),
"DLL::init");
221 std::string(
"_create")).c_str());
224 std::string(
"_destroy")).c_str());
228 std::string(
"_create")).c_str());
231 std::string(
"_destroy")).c_str());
233 if ( 0 == constructor) {
234 warning(
"Could not find constructor of "+iter->first,
"DLL::init");
237 if ( 0 == destructor) {
238 warning(
"Could not find destructor of "+iter->first,
"DLL::init");
279 std::vector<identification>::const_iterator iter;
284 if ( 0==name.compare(iter->first) ){
298 std::vector<identification>::const_iterator iter;
303 if ( 0==name.compare(iter->first) ){
306 return ( processus );
317 std::vector<identification>::const_iterator iter;
322 if ( 0==(ptr->
type()).compare(iter->first) ){
323 ( (*destructor)( ptr ) );
335 std::vector<identification>::const_iterator iter;
340 if ( 0==(ptr->
type()).compare(iter->first) ){
341 ( (*destructor)( ptr ) );
void setDllName(std::string dllName)
std::vector< std::string > objectList()
listOfElements m_listElements
listOfProcessus m_listProcessus
std::vector< ConstructorElement > m_elementConstructors
std::vector< DestructorProcessus > m_processusDestructors
std::vector< DestructorElement > m_elementDestructors
std::vector< ConstructorProcessus > m_processusConstructors
void info(std::string mymsg)
Processus *(* ConstructorProcessus)()
void(* EntryPoint)(DLL *)
StatusCode add(Processus *)
virtual ~DLL()
Destructor.
Element * createElement(std::string)
bool containsObject(std::string)
Processus * createProcessus(std::string)
Element *(* ConstructorElement)()
DLL()
Standard constructor.
void warning(std::string mymsg)
Processus * processus(std::string)
StatusCode destroy(Element *)
void debug(std::string mymsg)
void setName(std::string name)
void(* DestructorProcessus)(Processus *)
void(* DestructorElement)(Element *)
StatusCode load(std::string)