本文整理汇总了C++中IObject::getFullName方法的典型用法代码示例。如果您正苦于以下问题:C++ IObject::getFullName方法的具体用法?C++ IObject::getFullName怎么用?C++ IObject::getFullName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IObject
的用法示例。
在下文中一共展示了IObject::getFullName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readDeepHierarchy
//-*****************************************************************************
void readDeepHierarchy( IObject parent, const int level, const IObject& orig )
{
if ( level > DEPTH )
{
ICompoundProperty p = parent.getProperties();
IInt32ArrayProperty iap( p, "intArrayProp" );
std::string fullName = const_cast<std::string&>(
iap.getObject().getFullName() );
PATH_PAIR ret = PATHS.insert( fullName );
Int32ArraySamplePtr sampPtr = iap.getValue();
TESTING_ASSERT( sampPtr->get()[5] == 5 );
TESTING_ASSERT( sampPtr->get()[99] == 99 );
TESTING_ASSERT( sampPtr->size() == ( size_t ) HIGHVAL );
TESTING_ASSERT( ret.second );
TESTING_ASSERT( fullName == parent.getFullName() );
// walk back up the tree until you find the first child object
// under the top object, and check that it's the one we started
// with.
IObject _p = parent;
while ( _p.getParent().getParent() )
{
_p = _p.getParent();
}
TESTING_ASSERT( _p.getFullName() == orig.getFullName() );
return;
}
std::ostringstream strm;
strm << level;
std::string levelName = strm.str();
readDeepHierarchy( IObject( parent, levelName ), level + 1, orig );
}
示例2: 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);
}
}
示例3: visitObject
//-*****************************************************************************
void visitObject( IObject iObj )
{
std::string path = iObj.getFullName();
const MetaData &md = iObj.getMetaData();
if ( IPolyMeshSchema::matches( md ) || ISubDSchema::matches( md ) )
{
Box3d bnds = getBounds( iObj );
std::cout << path << " " << bnds.min << " " << bnds.max << std::endl;
}
// now the child objects
for ( size_t i = 0 ; i < iObj.getNumChildren() ; i++ )
{
visitObject( IObject( iObj, iObj.getChildHeader( i ).getName() ) );
}
}
示例4: pushName
//-*****************************************************************************
int pushName( IObject &iObj )
{
Abc::MetaData md = iObj.getMetaData();
if ( IPolyMesh::matches( md ) ||
IPoints::matches( md ) ||
ICurves::matches( md ) ||
INuPatch::matches( md ) ||
ISubD::matches( md )
)
{
OBJECT_MAP.push_back( iObj.getFullName() );
glPushName( OBJECT_MAP.size() );
//std::cout << OBJECT_MAP.size()
// << "\t"
// << iObj.getFullName()
// << std::endl;
return OBJECT_MAP.size();
} else {
return -1;
}
}
示例5: visitObject
//-*****************************************************************************
void visitObject( IObject iObj,
std::string iIndent )
{
// Object has a name, a full name, some meta data,
// and then it has a compound property full of properties.
std::string path = iObj.getFullName();
if ( path != "/" )
{
std::cout << "Object " << "name=" << path << std::endl;
}
// Get the properties.
ICompoundProperty props = iObj.getProperties();
visitProperties( props, iIndent );
// now the child objects
for ( size_t i = 0 ; i < iObj.getNumChildren() ; i++ )
{
visitObject( IObject( iObj, iObj.getChildHeader( i ).getName() ),
iIndent );
}
}