本文整理汇总了C++中PropertyPtr::PropertyIdentifier方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyPtr::PropertyIdentifier方法的具体用法?C++ PropertyPtr::PropertyIdentifier怎么用?C++ PropertyPtr::PropertyIdentifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyPtr
的用法示例。
在下文中一共展示了PropertyPtr::PropertyIdentifier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Unpack
//.........这里部分代码省略.........
{
// not refining anything, so it's a main node
p = std::make_shared<Property>(holderPtr);
}
else
{
// by elimination it's refining something-- we'll process it later when we know we've got all the main nodes in there
xmlXPathNodeSetAdd(refineNodes, node);
}
if ( p && p->ParseMetaElement(node) )
{
switch ( p->Type() )
{
case DCType::Identifier:
{
foundIdentifier = true;
if ( !uniqueIDRef.empty() && uniqueIDRef != p->XMLIdentifier() )
HandleError(EPUBError::OPFPackageUniqueIDInvalid);
break;
}
case DCType::Title:
{
foundTitle = true;
break;
}
case DCType::Language:
{
foundLanguage = true;
break;
}
case DCType::Custom:
{
if ( p->PropertyIdentifier() == MakePropertyIRI("modified", "dcterms") )
foundModDate = true;
break;
}
default:
break;
}
AddProperty(p);
StoreXMLIdentifiable(p);
}
}
if ( !foundIdentifier )
HandleError(EPUBError::OPFMissingIdentifierMetadata);
if ( !foundTitle )
HandleError(EPUBError::OPFMissingTitleMetadata);
if ( !foundLanguage )
HandleError(EPUBError::OPFMissingLanguageMetadata);
if ( !foundModDate )
HandleError(EPUBError::OPFMissingModificationDateMetadata);
for ( int i = 0; i < refineNodes->nodeNr; i++ )
{
xmlNodePtr node = refineNodes->nodeTab[i];
string ident = _getProp(node, "refines");
if ( ident.empty() )
{
HandleError(EPUBError::OPFInvalidRefinementAttribute, "Empty IRI for 'refines' attribute");
continue;
}