本文整理汇总了C++中DataElement::getDouble方法的典型用法代码示例。如果您正苦于以下问题:C++ DataElement::getDouble方法的具体用法?C++ DataElement::getDouble怎么用?C++ DataElement::getDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataElement
的用法示例。
在下文中一共展示了DataElement::getDouble方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: endElement
DECLARE_EXPORT void SolverMRP::endElement(XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA(Tags::tag_constraints))
setConstraints(pElement.getInt());
else if (pAttr.isA(Tags::tag_autocommit))
setAutocommit(pElement.getBool());
else if (pAttr.isA(Tags::tag_userexit_flow))
setUserExitFlow(pElement.getString());
else if (pAttr.isA(Tags::tag_userexit_demand))
setUserExitDemand(pElement.getString());
else if (pAttr.isA(Tags::tag_userexit_buffer))
setUserExitBuffer(pElement.getString());
else if (pAttr.isA(Tags::tag_userexit_resource))
setUserExitResource(pElement.getString());
else if (pAttr.isA(Tags::tag_userexit_operation))
setUserExitOperation(pElement.getString());
else if (pAttr.isA(Tags::tag_plantype))
setPlanType(pElement.getInt());
// Less common parameters
else if (pAttr.isA(tag_iterationthreshold))
setIterationThreshold(pElement.getDouble());
else if (pAttr.isA(tag_iterationaccuracy))
setIterationAccuracy(pElement.getDouble());
else if (pAttr.isA(tag_lazydelay))
setLazyDelay(pElement.getTimeperiod());
// Default parameters
else
Solver::endElement(pIn, pAttr, pElement);
}
示例2: if
DECLARE_EXPORT void SetupMatrix::Rule::endElement (XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA(Tags::tag_priority))
setPriority(pElement.getInt());
else if (pAttr.isA(Tags::tag_fromsetup))
setFromSetup(pElement.getString());
else if (pAttr.isA(Tags::tag_tosetup))
setToSetup(pElement.getString());
else if (pAttr.isA(Tags::tag_duration))
setDuration(pElement.getTimeperiod());
else if (pAttr.isA(Tags::tag_cost))
setCost(pElement.getDouble());
}
示例3: endElement
DECLARE_EXPORT void Item::endElement(XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA(Tags::tag_operation))
{
Operation *o = dynamic_cast<Operation*>(pIn.getPreviousObject());
if (o) setOperation(o);
else throw LogicException("Incorrect object type during read operation");
}
else if (pAttr.isA(Tags::tag_price))
setPrice(pElement.getDouble());
else
{
HasDescription::endElement(pIn, pAttr, pElement);
HasHierarchy<Item>::endElement(pIn, pAttr, pElement);
}
}