本文整理汇总了C++中DataElement::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ DataElement::getString方法的具体用法?C++ DataElement::getString怎么用?C++ DataElement::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataElement
的用法示例。
在下文中一共展示了DataElement::getString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: endElement
void HasDescription::endElement(DataInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA(Tags::tag_category))
setCategory(pElement.getString());
else if (pAttr.isA(Tags::tag_subcategory))
setSubCategory(pElement.getString());
else if (pAttr.isA(Tags::tag_description))
setDescription(pElement.getString());
else if (pAttr.isA(Tags::tag_source))
setSource(pElement.getString());
}
示例3: 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());
}
示例4: endElement
DECLARE_EXPORT void Solver::endElement(XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA(Tags::tag_loglevel))
{
int i = pElement.getInt();
if (i<0 || i>USHRT_MAX)
throw DataException("Invalid log level" + pElement.getString());
setLogLevel(i);
}
}
示例5: endElement
DECLARE_EXPORT void ResourceSkill::endElement (XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA (Tags::tag_resource))
{
Resource *r = dynamic_cast<Resource*>(pIn.getPreviousObject());
if (r) setResource(r);
else throw LogicException("Incorrect object type during read operation");
}
else if (pAttr.isA (Tags::tag_skill))
{
Skill *s = dynamic_cast<Skill*>(pIn.getPreviousObject());
if (s) setSkill(s);
else throw LogicException("Incorrect object type during read operation");
}
else if (pAttr.isA(Tags::tag_priority))
setPriority(pElement.getInt());
else if (pAttr.isA(Tags::tag_effective_end))
setEffectiveEnd(pElement.getDate());
else if (pAttr.isA(Tags::tag_effective_start))
setEffectiveStart(pElement.getDate());
else if (pAttr.isA(Tags::tag_action))
{
delete static_cast<Action*>(pIn.getUserArea());
pIn.setUserArea(
new Action(MetaClass::decodeAction(pElement.getString().c_str()))
);
}
else if (pIn.isObjectEnd())
{
// The resourceskill data is now all read in. See if it makes sense now...
Action a = pIn.getUserArea() ?
*static_cast<Action*>(pIn.getUserArea()) :
ADD_CHANGE;
delete static_cast<Action*>(pIn.getUserArea());
try { validate(a); }
catch (...)
{
delete this;
throw;
}
}
}
示例6: endElement
DECLARE_EXPORT void Skill::endElement (XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
if (pAttr.isA(Tags::tag_source))
setSource(pElement.getString());
}