本文整理汇总了C++中DllLoader::GetEModulePath方法的典型用法代码示例。如果您正苦于以下问题:C++ DllLoader::GetEModulePath方法的具体用法?C++ DllLoader::GetEModulePath怎么用?C++ DllLoader::GetEModulePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DllLoader
的用法示例。
在下文中一共展示了DllLoader::GetEModulePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: path
//.........这里部分代码省略.........
sim_type = SimType::STI_SIM;
#endif
#ifndef DISABLE_HIV
else if (sSimType == "HIV_SIM")
sim_type = SimType::HIV_SIM;
#endif // HIV
#ifdef ENABLE_DENGUE
else if (sSimType == "DENGUE_SIM")
sim_type = SimType::DENGUE_SIM;
#endif
#ifdef ENABLE_PYTHON_FEVER
else if (sSimType == "PY_SIM")
sim_type = SimType::PY_SIM;
#endif
else
{
std::ostringstream msg;
msg << "Simulation_Type " << sSimType << " not recognized." << std::endl;
throw Kernel::GeneralConfigurationException( __FILE__, __LINE__, __FUNCTION__, msg.str().c_str() );
}
#ifdef _DLLS_
// Look through disease dll directory, do LoadLibrary on each .dll,
// do GetProcAddress on GetMimeType() and CreateSimulation
typedef ISimulation* (*createSim)(const Environment *);
std::map< std::string, createSim > createSimFuncPtrMap;
// Note map operator [] will automatically initialize the pointer to NULL if not found
DllLoader dllLoader;
if (!dllLoader.LoadDiseaseDlls(createSimFuncPtrMap) || !createSimFuncPtrMap[sSimType])
{
std::ostringstream msg;
msg << "Failed to load disease emodules for SimType: " << SimType::pairs::lookup_key(sim_type) << " from path: " << dllLoader.GetEModulePath(DISEASE_EMODULES).c_str() << std::endl;
throw Kernel::DllLoadingException( __FILE__, __LINE__, __FUNCTION__, msg.str().c_str());
return newsim;
}
newsim = createSimFuncPtrMap[sSimType](EnvPtr);
release_assert(newsim);
#else // _DLLS_
switch (sim_type)
{
case SimType::GENERIC_SIM:
newsim = Simulation::CreateSimulation(EnvPtr->Config);
break;
#if defined(ENABLE_ENVIRONMENTAL)
case SimType::ENVIRONMENTAL_SIM:
newsim = SimulationEnvironmental::CreateSimulation(EnvPtr->Config);
break;
#endif
#if defined( ENABLE_POLIO)
case SimType::POLIO_SIM:
newsim = SimulationPolio::CreateSimulation(EnvPtr->Config);
break;
#endif
#if defined( ENABLE_TYPHOID)
case SimType::TYPHOID_SIM:
newsim = SimulationTyphoid::CreateSimulation(EnvPtr->Config);
break;
#endif
#ifndef DISABLE_VECTOR
case SimType::VECTOR_SIM:
newsim = SimulationVector::CreateSimulation(EnvPtr->Config);
break;
#endif