本文整理汇总了C++中ModelHistory::isSetCreatedDate方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelHistory::isSetCreatedDate方法的具体用法?C++ ModelHistory::isSetCreatedDate怎么用?C++ ModelHistory::isSetCreatedDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelHistory
的用法示例。
在下文中一共展示了ModelHistory::isSetCreatedDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deriveHistoryFromAnnotation
bool
RDFAnnotationParser::hasHistoryRDFAnnotation(const XMLNode *annotation)
{
bool hasHistoryRDF = false;
if (!RDFAnnotationParser::hasRDFAnnotation(annotation))
{
return hasHistoryRDF;
}
// check whether the annotation relates to Model History
ModelHistory *temp = deriveHistoryFromAnnotation(annotation);
/* ok I relaxed the test so that an invalid model could be stored
* but need to check that it resembles an model history in some
* way otherwise any RDF could be a model history
*/
if (temp != NULL) // && temp->getNumCreators() > 0)
{
if (temp->getNumCreators() > 0
|| temp->isSetCreatedDate() == true
|| temp->isSetModifiedDate() == true )
{
hasHistoryRDF = true;
}
}
delete temp;
return hasHistoryRDF;
}
示例2: empty
//.........这里部分代码省略.........
{
XMLNode empty(empty_token);
empty.append(c->getEmail());
Email = new XMLNode(Email_token);
Email->addChild(empty);
}
if (c->isSetOrganisation())
{
XMLNode empty(empty_token);
empty.append(c->getOrganisation());
XMLNode Orgname(Orgname_token);
Orgname.addChild(empty);
Org = new XMLNode(Org_token);
Org->addChild(Orgname);
}
XMLNode li(li_token);
if (N)
{
li.addChild(*N);
delete N;
}
if (Email)
{
li.addChild(*Email);
delete Email;
}
if (Org)
{
li.addChild(*Org);
delete Org;
}
if (c->getAdditionalRDF())
{
li.addChild(*(c->getAdditionalRDF()));
}
bag.addChild(li);
}
XMLNode creator(creator_token);
creator.addChild(bag);
description->addChild(creator);
/* created date */
if (history->isSetCreatedDate())
{
XMLNode empty(empty_token);
empty.append(history->getCreatedDate()->getDateAsString());
W3CDTF1.addChild(empty);
created.addChild(W3CDTF1);
description->addChild(created);
}
/* modified date */
if (history->isSetModifiedDate())
{
XMLNode empty(empty_token);
empty.append(history->getModifiedDate(0)->getDateAsString());
W3CDTF2.addChild(empty);
modified.addChild(W3CDTF2);
description->addChild(modified);
for (unsigned int n = 1; n < history->getNumModifiedDates(); n++)
{
XMLNode empty(empty_token);
W3CDTF2.removeChildren();
modified.removeChildren();
empty.append(history->getModifiedDate(n)->getDateAsString());
W3CDTF2.addChild(empty);
modified.addChild(W3CDTF2);
description->addChild(modified);
}
}
// add CVTerms here
XMLNode *CVTerms = createCVTerms(object);
if (CVTerms)
{
for (unsigned int i = 0; i < CVTerms->getNumChildren(); i++)
{
description->addChild(CVTerms->getChild(i));
}
delete CVTerms;
}
XMLNode * RDF = createRDFAnnotation();
RDF->addChild(*description);
delete description;
XMLNode *ann = createAnnotation();
ann->addChild(*RDF);
delete RDF;
return ann;
}