[MOAB-dev] Reader/Writer filename extension access

Jed Brown jed at 59A2.org
Fri Apr 30 09:50:22 CDT 2010


On Fri, 30 Apr 2010 09:17:55 -0500, Robert Smith <smithrm at mcs.anl.gov> wrote:
> 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.

I still don't understand the purpose of getting ahold of the
implementation (dependency violation aside), you have a file/file name,
there is an API that will give you an instance that reads/writes that
file, what more do you want?  If the issue is debugging, the debugger
already has that information.

> 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.

So a virtual method in ReaderIface and WriterIface could be acceptable
as long as you wanted to make the valid extensions built-in to the class
(instead of being able to specify them when calling
ReaderWriterSet::register_factory()).  Using static members or
dynamic_cast would violate the fact that
ReaderWriterSet::register_factory should be the only place where the
implementations are referred to.

Jed


More information about the moab-dev mailing list