| 2608 | } |
| 2609 | |
| 2610 | SceneInterfacePtr SceneCache::scene( const Path &path, MissingBehaviour missingBehaviour ) |
| 2611 | { |
| 2612 | if (ReaderImplementation *reader = ReaderImplementation::reader( m_implementation.get(), false ) ) |
| 2613 | { |
| 2614 | ImplementationPtr impl = reader->scene( path, missingBehaviour ); |
| 2615 | if( !impl ) |
| 2616 | { |
| 2617 | return nullptr; |
| 2618 | } |
| 2619 | |
| 2620 | return duplicate( impl ); |
| 2621 | } |
| 2622 | else if (WriterImplementation *writer = WriterImplementation::writer( m_implementation.get(), false ) ) |
| 2623 | { |
| 2624 | ImplementationPtr impl = writer->scene( path, missingBehaviour ); |
| 2625 | if( !impl ) |
| 2626 | { |
| 2627 | return nullptr; |
| 2628 | } |
| 2629 | |
| 2630 | return duplicate( impl ); |
| 2631 | } |
| 2632 | |
| 2633 | return nullptr; |
| 2634 | } |
| 2635 | |
| 2636 | ConstSceneInterfacePtr SceneCache::scene( const Path &path, SceneCache::MissingBehaviour missingBehaviour ) const |
| 2637 | { |