//-***************************************************************************** AbcA::ObjectWriterPtr AwImpl::getTop() { AbcA::ObjectWriterPtr ret = m_top.lock(); if ( ! ret ) { // time to make a new one ret.reset( new OwImpl( asArchivePtr(), m_data, m_metaData ) ); m_top = ret; } return ret; }
//-***************************************************************************** AbcA::ObjectReaderPtr ArImpl::getTop() { Alembic::Util::scoped_lock l( m_orlock ); AbcA::ObjectReaderPtr ret = m_top.lock(); if ( ! ret ) { // time to make a new one ret = Alembic::Util::shared_ptr<OrImpl>( new OrImpl( asArchivePtr(), m_data, m_header ) ); m_top = ret; } return ret; }