44 if((pLibHandle_ = dlopen(sLibraryName.c_str(), RTLD_NOW)) == 0)
49 if((createLayerFunc_ = reinterpret_cast<CreateLayerFunc>((
void (*)())(dlsym(pLibHandle_,
"create")))) == 0)
52 throw makeException<Utils::FactoryException>(
"%s missing create symbol. (Missing DECLARE_XXX_LAYER()?)",
53 sLibraryName.c_str());
56 if((destroyLayerFunc_ = reinterpret_cast<DestroyLayerFunc>((
void (*)())dlsym(pLibHandle_,
"destroy"))) == 0)
59 throw makeException<Utils::FactoryException>(
"%s missing destroy symbol. (Missing DECLARE_XXX_LAYER()?)",
60 sLibraryName.c_str());
75 return createLayerFunc_(
id, pPlatformServiceProvider,pRadioServiceProvider);
81 destroyLayerFunc_(pLayer);
void destoryLayer(T *layer) const
Exception thrown during the creation of a layer factory.
The RadioServiceProvider interface provides access to radio (RF) model specific services.
T * createLayer(NEMId nemId, PlatformServiceProvider *pPlatformService, RadioServiceProvider *pRadioServiceProvider) const
LayerFactory(const std::string &sLibraryName)