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


C++ IObject::getName方法代码示例

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


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

示例1: recursivelyReadChildren

void recursivelyReadChildren( IObject& parent )
{
    unsigned int numChildren = parent.getNumChildren();
    std::cout << " has " << numChildren << " children"
              << std::endl;

    for (unsigned int ii=0; ii<numChildren; ii++)
    {
        IObject child = parent.getChild(ii);
        std::cout << "  " << child.getName();

        unsigned int expectedChildren = 2;
        if (child.getName().substr(6,1) == "2")
            // bottom of the hierarchy
            expectedChildren = 0;

        unsigned int children = child.getNumChildren();
        ABCA_ASSERT( children == expectedChildren,
                     "Expected " << expectedChildren << " children " <<
                     "but found " << children );

        recursivelyReadChildren( child );
    }

    return;
}
开发者ID:BlackGinger,项目名称:ExocortexCrate,代码行数:26,代码来源:ObjectTests.cpp

示例2: parseFeature

bool Chain::parseFeature (TiXmlElement *element) {

	int n_features = 0;
	element->QueryIntAttribute ("size", &n_features);

	ssi_msg (SSI_LOG_LEVEL_DETAIL, "found %u feature", n_features); 

	if (n_features > 0) {
		_n_features = n_features;
		_features = new IFeature *[_n_features];
		for (ssi_size_t i = 0; i < _n_features; i++) {
			_features[i] = 0;
		}
		TiXmlElement *item = 0;
		for (ssi_size_t i = 0; i < _n_features; i++) {
			if (i == 0) {
				item = element->FirstChildElement ("item");	
			} else {
				item = item->NextSiblingElement ("item");
			}
			if (!item) {
				ssi_wrn ("feature: failed parsing '%u'th <item> tag", i);
				return false;
			}
			IObject *object = _xmlpipe->parseObject (item, false);
			if (!object) {
				ssi_wrn ("filter: class not found");
				return false;
			}
			if (object->getType () != SSI_FEATURE) {
				ssi_wrn ("feature: class is not a feature");
				return false;
			}
			IFeature *feature = ssi_pcast (IFeature, object);
			if (!feature) {
				ssi_wrn ("feature: failed loading feature object");
				return false;
			}

			ssi_msg (SSI_LOG_LEVEL_DETAIL, "load %u. feature '%s'", i+1, object->getName ()); 

			_features[i] = feature;
		}
	}

	return true;
}
开发者ID:hihiy,项目名称:IntelliVoice,代码行数:47,代码来源:Chain.cpp

示例3: ApplyResources

void ApplyResources( IObject object, ProcArgs &args )
{
    std::string resourceName;
    
    //first check full name...
    resourceName = args.getResource( object.getFullName() );
    
    if ( resourceName.empty() )
    {
        //...and then base name
        resourceName = args.getResource( object.getName() );
    }
    
    if ( !resourceName.empty() )
    {
        RestoreResource(resourceName);
    }
}
开发者ID:AWhetter,项目名称:alembic,代码行数:18,代码来源:WriteGeo.cpp

示例4: getNamedCamera

bool getNamedCamera( IObject iObjTop, const std::string &iName, ICamera &iCam )
{
	// Return true if found

	const Alembic::AbcGeom::MetaData &md = iObjTop.getMetaData();
	if ( (iObjTop.getName() == iName) && (ICamera::matches( md )) )
	{
		iCam = ICamera(iObjTop, kWrapExisting );
		return true;
	}

	// now the child objects
	for ( size_t i = 0 ; i < iObjTop.getNumChildren() ; i++ )
	{
		if (getNamedCamera(IObject( iObjTop, iObjTop.getChildHeader( i ).getName() ), iName, iCam ))
			return true;
	}

	return false;

}
开发者ID:ivanbusquets,项目名称:ABCNuke,代码行数:21,代码来源:ABCNuke_ArchiveHelper.cpp


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