本文整理汇总了C++中ModelHistory::getCreator方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelHistory::getCreator方法的具体用法?C++ ModelHistory::getCreator怎么用?C++ ModelHistory::getCreator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelHistory
的用法示例。
在下文中一共展示了ModelHistory::getCreator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: empty
//.........这里部分代码省略.........
XMLToken W3CDTF2_token = XMLToken(W3CDTF_triple, blank_att);
XMLToken empty_token = XMLToken("");
/* nodes */
XMLNode bag = XMLNode(bag_token);
XMLNode created = XMLNode(created_token);
XMLNode modified= XMLNode(modified_token);
XMLNode W3CDTF1 = XMLNode(W3CDTF1_token);
XMLNode W3CDTF2 = XMLNode(W3CDTF2_token);
//
// The following XMLNode objects are used only
// in the for loop below (for each ModelCreator object
// in ModelHistory object) and reset in each step.
// Thus, they are defined only in the block in which
// they are used to avoid a memory leak.
//
// XMLNode * N
// XMLNode * Email
// XMLNode * Org
// XMLNode Family;
// XMLNode Given
// XMLNode Orgname
// XMLNode li
//
/* now add the data from the ModelHistory */
for (unsigned int n = 0; n < history->getNumCreators(); n++)
{
XMLNode * N = 0;
XMLNode * Email = 0;
XMLNode * Org = 0;
ModelCreator* c = history->getCreator(n);
if (c->isSetFamilyName())
{
XMLNode empty(empty_token);
empty.append(c->getFamilyName());
XMLNode Family(Family_token);
Family.addChild(empty);
N = new XMLNode(N_token);
N->addChild(Family);
}
if (c->isSetGivenName())
{
XMLNode empty(empty_token);
empty.append(c->getGivenName());
XMLNode Given(Given_token);
Given.addChild(empty);
if (!N)
{
N = new XMLNode(N_token);
}
N->addChild(Given);
}
if (c->isSetEmail())
{
XMLNode empty(empty_token);
empty.append(c->getEmail());