40 createEventGeneratorFunc_{},
41 destroyEventGeneratorFunc_{}
43 if((pLibHandle_ = dlopen(sLibraryName.c_str(), RTLD_NOW)) == 0)
48 if((createEventGeneratorFunc_ = reinterpret_cast<CreateEventGeneratorFunc>((
void (*)())(dlsym(pLibHandle_,
"create")))) == 0)
51 throw makeException<Utils::FactoryException>(
"%s missing create symbol. (Missing DECLARE_EVENT_GENERATOR()?)",
52 sLibraryName.c_str());
55 if((destroyEventGeneratorFunc_ = reinterpret_cast<DestroyEventGeneratorFunc>((
void (*)())dlsym(pLibHandle_,
"destroy"))) == 0)
58 throw makeException<Utils::FactoryException>(
"%s missing destory symbol. (Missing DECLARE_EVENT_GENERATOR()?)",
59 sLibraryName.c_str());
71 return createEventGeneratorFunc_(pPlatformService);
76 destroyEventGeneratorFunc_(pGenerator);
void destoryEventGenerator(EventGenerator *pGen) const
Base class for all event generators.
EventGeneratorFactory(const std::string &sLibraryName)
Exception thrown during the creation of a layer factory.
EventGenerator * createEventGenerator(PlatformServiceProvider *pPlatformService) const