[MOAB-dev] Reader/Writer filename extension access

Jason Kraftcheck kraftche at cae.wisc.edu
Thu Apr 29 15:56:08 CDT 2010


Robert Smith wrote:
> I'm looking for some comments on Ticket #142 and my thoughts below.
> 
> Ticket #142 asks for 3 things from the Reader/Writer interface:
> 
>       1) Given an extension or filename, get the name or actual
> reader/writer that can handle it
>     2a) Get the extensions a reader/writer handles and
>     2b) possibly all the readers/writers registered.
> 
> I believe 1) is covered by the existing interface on ReaderWriterSet. 
> The get_file_extension_reader/ get_file_extension_writer functions do this.
> 

No.  ReaderWriterSet, as it currently exists, can provide 2.  It provides
the necessary functionality to iterate over the list of readers and writers.
   This provides 2b) directly, and searching said list would provide 2a).
It is 1) that cannot be robustly provided.  As you stated: ReaderWriterSet
can return a reader that claims to handle a given file name extension.
However, this doesn't account for what MOAB would do given a file with an
unknown extension.  It may succeed in reading such a file.

- jason


More information about the moab-dev mailing list