[Dune-devel] Public interface of GridView

Oliver Sander sander at igpm.rwth-aachen.de
Fri Feb 21 11:00:07 CET 2014


Am 21.02.2014 10:44, schrieb Markus Blatt:
> 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.

We have had that discussion before, and the current consensus, AIUI, is that we
require wrapper classes for everything except for the grid itself.  People that
want to access the engine classes directly need to set EXPERIMENTAL_GRID_EXTENSION.
Consequently, the constructor from Imp is currently protected in all classes
(Entity, Geometry, etc), except for the GridView.

--
Oliver

> 
> 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
> 
> 
> 
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 534 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140221/3e98f6ac/attachment.sig>


More information about the Dune-devel mailing list