本文整理汇总了C++中openfluid::ware::WareParams_t::find方法的典型用法代码示例。如果您正苦于以下问题:C++ WareParams_t::find方法的具体用法?C++ WareParams_t::find怎么用?C++ WareParams_t::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openfluid::ware::WareParams_t
的用法示例。
在下文中一共展示了WareParams_t::find方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OPENFLUID_GetSimulatorParameter
bool PluggableSimulator::OPENFLUID_GetSimulatorParameter(const openfluid::ware::WareParams_t& Params,
const openfluid::ware::WareParamKey_t& ParamName,
std::vector<long>& Vals) const
{
bool IsOK = false;
openfluid::ware::WareParams_t::const_iterator it = Params.find(ParamName);
if (it != Params.end())
{
openfluid::core::VectorValue Vect;
IsOK = it->second.toVectorValue(";",Vect);
if(IsOK)
{
Vals.clear();
for (unsigned long i=0;i<Vect.size();i++)
Vals.push_back(static_cast<int>(Vect[i]));
}
}
return IsOK;
}
示例2: initParams
void initParams(const openfluid::ware::WareParams_t& Params)
{
if (Params.find("part") != Params.end())
m_PartStr = Params.at("part").toString();
if (m_PartStr == "initparams")
OPENFLUID_RaiseError(m_PartStr);
}
示例3:
openfluid::core::StringValue PluggableSimulator::OPENFLUID_GetSimulatorParameter(
const openfluid::ware::WareParams_t& Params,
const openfluid::ware::WareParamKey_t& ParamName) const
{
openfluid::ware::WareParams_t::const_iterator it = Params.find(ParamName);
if (it != Params.end())
return it->second;
else
throw openfluid::base::FrameworkException(computeFrameworkContext(OPENFLUID_CODE_LOCATION),
"Parameter "+ParamName+ " does not exist");
}
示例4: OPENFLUID_IsSimulatorParameterExist
bool PluggableSimulator::OPENFLUID_IsSimulatorParameterExist(const openfluid::ware::WareParams_t& Params,
const openfluid::ware::WareParamKey_t& ParamName) const
{
return (Params.find(ParamName) != Params.end());
}