[Dune-devel] Public interface of GridView

Markus Blatt markus at dr-blatt.de
Fri Feb 21 10:44:32 CET 2014


Hi,

On Wed, Feb 19, 2014 at 02:32:50PM +0100, Oliver Sander wrote:
> I have been looking at the interface of the GridView class, and I have noticed that
> it publicly exports its implementation type GridViewImp.  Also, there is a public
> constructor from a GridViewImp.  Is that intentional?  Usually we try to hide these
> implementation classes from the normal user.  Shouldn't the type & constructor be protected
> instead?

In an ideal world, where we know that we have thought about everything in our
interface, the answer would be yes. In the current world and state I
would say no, unless ...

I do not see the implementation as an implementation per se. It is
more like how  a grid view looks for the developer of a specific
grid. There might and probably already are cases where the underlying
view provides some more advanced features that are not accessible via our
interface. Giving users and grid developers the possibility to access
the type and the instance of the implementation might allow them to
write specialized code for this kind of grid and gain either
performance or more functionality.

Of course, if we do not demand from the grid developers to use our
engines classes (not really sure whether we do or do not), then people
could get the same by providing native GridView classes. In this case
we could/should probably protect type and constructor.

Just my 2 cents.

Markus
-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140221/d1d157fe/attachment.sig>


More information about the Dune-devel mailing list