[MOAB-dev] Reader/Writer filename extension access

Jason Kraftcheck kraftche at cae.wisc.edu
Fri Apr 30 09:59:40 CDT 2010


Robert Smith wrote:
> 
> On Apr 30, 2010, at 9:05 AM, Jed Brown wrote:
> 
>> On Fri, 30 Apr 2010 09:01:09 -0500, Robert Smith <smithrm at mcs.anl.gov>
>> wrote:
>>> What do you mean by "not part of the MOAB API"?  We can't dictate the
>>> structure of the Readers/Writers?
>>
>> I think Jason's point was that it's unacceptable for client code to have
>> a dependency on the implementations.
> 
> Do you mean the code that uses the Readers/Writers?  I would agree, it
> should not depend on the implementation.  But does that mean no client
> code can know which particular Reader/Writer it is using?  If that's
> true then the entire purpose of the ticket seems moot.

No, the application needs to know the file format that it wants to
read/write.  It does not need to have a pointer to the Reader/Writer
instance in MOAB that implements that file format.  For example, why not
instead have functions that return a list of string names for all the
readers and writers, and then have functions that, given a string name,
return the list of extensions or description.

> 
> If that's not what you mean then I don't see how my suggestions open the
> implementation to the users.  They are just new member functions.
> 

They require that we install headers for all the reader/writer
implementations and that the app include those headers, effectively making
all of the implementations part of the MOAB API.

- jason


More information about the moab-dev mailing list