本文整理汇总了C++中DataElement::getDate方法的典型用法代码示例。如果您正苦于以下问题:C++ DataElement::getDate方法的具体用法?C++ DataElement::getDate怎么用?C++ DataElement::getDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataElement
的用法示例。
在下文中一共展示了DataElement::getDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
}
}