本文整理汇总了C++中NameList::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ NameList::erase方法的具体用法?C++ NameList::erase怎么用?C++ NameList::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NameList
的用法示例。
在下文中一共展示了NameList::erase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: attributeNames
void LiveScene::attributeNames( NameList &attrs ) const
{
if( !m_isRoot && m_dagPath.length() == 0 )
{
throw Exception( "IECoreMaya::LiveScene::attributeNames: Dag path no longer exists!" );
}
tbb::mutex::scoped_lock l( s_mutex );
attrs.clear();
attrs.push_back( SceneInterface::visibilityName );
// translate attributes with names starting with "ieAttr_":
MFnDependencyNode fnNode( m_dagPath.node() );
unsigned int n = fnNode.attributeCount();
for( unsigned int i=0; i<n; i++ )
{
MObject attr = fnNode.attribute( i );
MFnAttribute fnAttr( attr );
MString attrName = fnAttr.name();
if( attrName.length() > 7 && ( strstr( attrName.asChar(),"ieAttr_" ) == attrName.asChar() ) )
{
attrs.push_back( ( "user:" + attrName.substring( 7, attrName.length()-1 ) ).asChar() );
}
}
// add attributes from custom readers:
for ( std::vector< CustomAttributeReader >::const_iterator it = customAttributeReaders().begin(); it != customAttributeReaders().end(); it++ )
{
it->m_names( m_dagPath, attrs );
}
// remove duplicates:
std::sort( attrs.begin(), attrs.end() );
attrs.erase( std::unique( attrs.begin(), attrs.end() ), attrs.end() );
}
示例2: attributeNames
void LinkedScene::attributeNames( NameList &attrs ) const
{
if ( m_linkedScene && !m_atLink )
{
m_linkedScene->attributeNames(attrs);
}
else
{
m_mainScene->attributeNames(attrs);
for ( NameList::iterator it = attrs.begin(); it != attrs.end(); it++ )
{
// \todo: remove "*it == linkAttribute" when it's no longer relevant
if ( *it == linkAttribute || *it == fileNameLinkAttribute || *it == rootLinkAttribute || *it == timeLinkAttribute )
{
attrs.erase( it );
--it;
}
}
}
}