当前位置: 首页>>代码示例>>C++>>正文


C++ GraphComponentPtr::setName方法代码示例

本文整理汇总了C++中GraphComponentPtr::setName方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphComponentPtr::setName方法的具体用法?C++ GraphComponentPtr::setName怎么用?C++ GraphComponentPtr::setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GraphComponentPtr的用法示例。


在下文中一共展示了GraphComponentPtr::setName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: addChildInternal

void GraphComponent::addChildInternal( GraphComponentPtr child )
{
	child->parentChanging( this );
	GraphComponent *previousParent = child->m_parent;
	if( previousParent )
	{
		// remove the child from the previous parent, but don't emit parentChangedSignal.
		// this prevents a parent changed signal with new parent 0 followed by a parent
		// changed signal with the new parent.
		previousParent->removeChildInternal( child, false );
	}
	m_children.push_back( child );
	child->m_parent = this;
	child->setName( child->m_name.value() ); // to force uniqueness
	childAddedSignal()( this, child.get() );
	child->parentChangedSignal()( child.get(), previousParent );
}
开发者ID:dboogert,项目名称:gaffer,代码行数:17,代码来源:GraphComponent.cpp

示例2: setChild

void GraphComponent::setChild( const IECore::InternedString &name, GraphComponentPtr child )
{
	GraphComponentPtr existingChild = getChild<GraphComponent>( name );
	if( existingChild && existingChild == child )
	{
		return;
	}
	
	throwIfChildRejected( child.get() );

	if( existingChild )
	{
		removeChild( existingChild );
	}
	
	child->setName( name );
	addChild( child );
}
开发者ID:dboogert,项目名称:gaffer,代码行数:18,代码来源:GraphComponent.cpp

示例3: addChildInternal

void GraphComponent::addChildInternal( GraphComponentPtr child, size_t index )
{
	child->parentChanging( this );
	GraphComponent *previousParent = child->m_parent;
	if( previousParent )
	{
		// remove the child from the previous parent, but don't emit parentChangedSignal.
		// this prevents a parent changed signal with new parent null followed by a parent
		// changed signal with the new parent.
		previousParent->removeChildInternal( child, false );
	}

	m_children.insert( m_children.begin() + min( index, m_children.size() ), child );
	child->m_parent = this;
	child->setName( child->m_name.value() ); // to force uniqueness
	Signals::emitLazily( m_signals.get(), &Signals::childAddedSignal, this, child.get() );
	child->parentChanged( previousParent );
	Signals::emitLazily( child->m_signals.get(), &Signals::parentChangedSignal, child.get(), previousParent );
}
开发者ID:dmar,项目名称:gaffer,代码行数:19,代码来源:GraphComponent.cpp


注:本文中的GraphComponentPtr::setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。