<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi.<br>
<br>
I know it is not part of the "official" coding style but i do think<br>
that all (complex) return and parameter types used in methods of a Dune
<br>
class should be made publicly available by that class- <br>
so yes I think Grid should be exported.<br>
<br>
Best<br>
Andreas<br>
<br>
On 07/20/2011 09:47 AM, Jö Fahlke wrote:
<blockquote cite="mid:20110720084743.GQ16955@paranoia" type="cite">
<pre wrap="">Am Wed, 20. Jul 2011, 13:51:13 +0530 schrieb Jayesh Badwaik:
</pre>
<blockquote type="cite">
<pre wrap="">I needed to extract the gridtype from the GmshReader and hence, for the same
purpose,
I have made the GridType public in my gmshreader.hh file in the defintion of
GmshReader class definition by adding the following line
typedef GridType GridImp;
I think it is a good idea for me, what do you think?
Has anybody ever felt this need?
I am creating a framework over dune, and there is a class named as
DeviceFactory which creates a grid and then collects the grid data
from the file and then converts the data into a form which i am using and
then after that sends all the information to a class Device.
I was already passing the GmshReader<GridImp> as a template Parameter to the
DeviceFactory
and I found the extra GridImp Parameter that I had to pass to create the
grid redundant. and so the change.
</pre>
</blockquote>
<pre wrap="">Why don't you use GridImp as the template parameter for the Device class?
E.g.
template<class GridImp>
class Device {
typedef GmshReader<GridImp> Reader;
...
};
Or you can use partial specialization:
template<class Reader>
class Device;
template<class GridImp>
class Device<GmshReader<GridImp> > {
typedef GmshReader<GridImp> Reader;
...
};
That said, I'm slightly in favour of the GmshReader exporting the grid type,
since that allows to substitude the GmshReader by a modified class (which
wouldn't work with the above constructs). I'm against exporting it under the
name "GridType" however, I would much prefer the shorter name "Grid".
Jö.
</pre>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Dune mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dune@dune-project.org">Dune@dune-project.org</a>
<a class="moz-txt-link-freetext"
href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a>
</pre>
</blockquote>
<br>
</body>
</html>