![]() |
Inviwo
0.9.10.1
Inviwo documentation
|
Inheritance diagram for inviwo::DataWriterFactory:Public Types | |
| using | Map = std::unordered_map< FileExtension, DataWriter * > |
Public Member Functions | |
| bool | registerObject (DataWriter *reader) |
| bool | unRegisterObject (DataWriter *reader) |
| virtual std::unique_ptr< DataWriter > | create (const std::string &key) const |
| virtual std::unique_ptr< DataWriter > | create (const FileExtension &key) const override |
| virtual bool | hasKey (const std::string &key) const |
| virtual bool | hasKey (const FileExtension &key) const override |
| template<typename T > | |
| std::vector< FileExtension > | getExtensionsForType () |
| template<typename T > | |
| std::unique_ptr< DataWriterType< T > > | getWriterForTypeAndExtension (const std::string &ext) |
| template<typename T > | |
| std::unique_ptr< DataWriterType< T > > | getWriterForTypeAndExtension (const FileExtension &ext) |
| template<typename T > | |
| std::unique_ptr< DataWriterType< T > > | getWriterForTypeAndExtension (const FileExtension &ext, const std::string &fallbackExt) |
Public Member Functions inherited from inviwo::Factory< DataWriter, const FileExtension & > | |
| virtual std::unique_ptr< DataWriter > | create (const FileExtension & key, Args... args) const=0 |
Public Member Functions inherited from inviwo::FactoryBase | |
| FactoryBase (const FactoryBase &)=delete | |
| FactoryBase & | operator= (const FactoryBase &)=delete |
| FactoryBase (FactoryBase &&)=default | |
| FactoryBase & | operator= (FactoryBase &&)=default |
Protected Attributes | |
| Map | map_ |
| std::unique_ptr< DataWriterType< T > > inviwo::DataWriterFactory::getWriterForTypeAndExtension | ( | const FileExtension & | ext, |
| const std::string & | fallbackExt | ||
| ) |
First look for a writer using the FileExtension ext, and if no writer was found look for a writer using the fallbackExt. This is often used with a file open dialog, where the dialog will have a selectedFileExtension that will be used as ext, and the fallbackExt is taken from the file to be written. This way any selected writer will have priority over the file extension.