本文整理汇总了C++中GraphComponent::children方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphComponent::children方法的具体用法?C++ GraphComponent::children怎么用?C++ GraphComponent::children使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphComponent
的用法示例。
在下文中一共展示了GraphComponent::children方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: values
static boost::python::list values( GraphComponent &c )
{
const GraphComponent::ChildContainer &ch = c.children();
boost::python::list l;
for( GraphComponent::ChildContainer::const_iterator it=ch.begin(); it!=ch.end(); it++ )
{
l.append( *it );
}
return l;
}
示例2: keys
static boost::python::list keys( GraphComponent &c )
{
const GraphComponent::ChildContainer &ch = c.children();
boost::python::list l;
for( GraphComponent::ChildContainer::const_iterator it=ch.begin(); it!=ch.end(); it++ )
{
l.append( (*it)->getName().c_str() );
}
return l;
}
示例3: children
static boost::python::tuple children( GraphComponent &c, IECore::TypeId typeId )
{
const GraphComponent::ChildContainer &ch = c.children();
boost::python::list l;
for( GraphComponent::ChildContainer::const_iterator it=ch.begin(); it!=ch.end(); it++ )
{
if( (*it)->isInstanceOf( typeId ) )
{
l.append( *it );
}
}
return boost::python::tuple( l );
}
示例4: getItem
static GraphComponentPtr getItem( GraphComponent &g, long index )
{
long s = g.children().size();
if( index < 0 )
{
index += s;
}
if( index >= s || index < 0 )
{
PyErr_SetString( PyExc_IndexError, "GraphComponent index out of range" );
throw_error_already_set();
}
return g.getChild<GraphComponent>( index );
}
示例5: length
static int length( GraphComponent &g )
{
return g.children().size();
}