本文整理汇总了C++中IObject::getArchive方法的典型用法代码示例。如果您正苦于以下问题:C++ IObject::getArchive方法的具体用法?C++ IObject::getArchive怎么用?C++ IObject::getArchive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IObject
的用法示例。
在下文中一共展示了IObject::getArchive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scopingTest
void scopingTest(bool useOgawa)
{
{
OObject top;
{
OArchive archive;
if (useOgawa)
{
archive = CreateArchiveWithInfo(
Alembic::AbcCoreOgawa::WriteArchive(),
"archiveScopeTest.abc",
"Alembic test", "", MetaData() );
}
else
{
archive = CreateArchiveWithInfo(
Alembic::AbcCoreHDF5::WriteArchive(),
"archiveScopeTest.abc",
"Alembic test", "", MetaData() );
}
top = archive.getTop();
}
OObject childA( top, "a");
OObject childB( top, "b");
ODoubleProperty prop(top.getProperties(), "prop", 0);
TESTING_ASSERT(prop.getObject().getArchive().getName() ==
"archiveScopeTest.abc");
}
{
IObject top;
{
AbcF::IFactory factory;
AbcF::IFactory::CoreType coreType;
IArchive archive = factory.getArchive("archiveScopeTest.abc",
coreType);
TESTING_ASSERT( (useOgawa && coreType == AbcF::IFactory::kOgawa) ||
(!useOgawa && coreType == AbcF::IFactory::kHDF5) );
top = archive.getTop();
double start, end;
GetArchiveStartAndEndTime( archive, start, end );
TESTING_ASSERT( start == DBL_MAX && end == -DBL_MAX );
}
TESTING_ASSERT(top.getNumChildren() == 2 );
TESTING_ASSERT(top.getChildHeader("a") != NULL);
TESTING_ASSERT(top.getChildHeader("b") != NULL);
TESTING_ASSERT( ! top.getParent().valid() );
TESTING_ASSERT( top.getArchive().getName() ==
"archiveScopeTest.abc");
IScalarProperty prop(top.getProperties(), "prop");
TESTING_ASSERT(prop.valid());
TESTING_ASSERT(prop.getObject().getArchive().getName() ==
"archiveScopeTest.abc");
}
}