当前位置: 首页>>代码示例>>C++>>正文


C++ DataElement::getString方法代码示例

本文整理汇总了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);
}
开发者ID:mcassuto,项目名称:frePPLe,代码行数:29,代码来源:solverplan.cpp

示例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());
}
开发者ID:WHELLINCK,项目名称:frePPLe,代码行数:11,代码来源:library.cpp

示例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());
}
开发者ID:ConePerez,项目名称:frePPLe,代码行数:13,代码来源:setupmatrix.cpp

示例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);
  }
}
开发者ID:dhl,项目名称:frePPLe,代码行数:10,代码来源:solver.cpp

示例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;
    }
  }
}
开发者ID:albertca,项目名称:frePPLe,代码行数:42,代码来源:resourceskill.cpp

示例6: endElement

DECLARE_EXPORT void Skill::endElement (XMLInput& pIn, const Attribute& pAttr, const DataElement& pElement)
{
  if (pAttr.isA(Tags::tag_source))
    setSource(pElement.getString());
}
开发者ID:dhl,项目名称:frePPLe,代码行数:5,代码来源:skill.cpp


注:本文中的DataElement::getString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。