<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Just one caveat (you probably already know and agree with this). In
my experience using C++ multiple inheritance, I think you should try
to avoid situations where you have common base classes in the
inheritance pathways. Virtual base classes are the usual
recommendation to resolve certain problems that arise in such cases,
but IMHO having experience with that, I generally recommend against
it.<br>
<br>
So I recommend your base classes should be of the "<u>mix-in</u>"
interface category, not relaying on any common base class. The
approach works fine for me in almost every situation.<br>
<br>
- Paul<br>
<br>
<div class="moz-cite-prefix">On 07/02/2018 12:44 AM, Todd Martin via
vtk-developers wrote:<br>
</div>
<blockquote type="cite"
cite="mid:486556535.1248987.1530510262667@mail.yahoo.com"><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
<div style="font-family:Helvetica Neue, Helvetica, Arial,
sans-serif;font-size:16px;">
<div style="font-family:Helvetica Neue, Helvetica, Arial,
sans-serif;font-size:16px;">
<div>
<div>Single inheritance languages like Java and C# utilize <i>interfaces</i>
extensively. Python 2.7+ handles the same concept with
abstract base classes, ABCs.<br>
<div><br>
<div>
<div>
<div>Is there any interest in supporting<i>
interfaces</i> in VTK via multiple inheritance
from abstract classes (which do not inherit from
vtkObject) while retaining the single inheritance
model?<br>
<div><br>
In my view there are good reasons to do so. For
example vtkCell has methods like
GetNumberOfEdges(), <span>GetEdge(),</span>
GetNumberOfFaces(), GetFace() etc. which really
only apply to multi-dimensional cells (both
linear and non-linear); i.e. not points and
lines. These methods are forced on the base
class design by a single inheritance structure
and the linear/non-linear cell sub-types. In my
view it would be better if they were distributed
across the sub-classes via the concept of
interfaces. So I'm suggesting a limited use of
multiple inheritance here, not a free-for-all
approach. What do others think about this?<br>
<div>
<div>
<div>
<div><br>
</div>
For an example please see this merge
request <a
href="https://gitlab.kitware.com/vtk/vtk/merge_requests/4372"
rel="nofollow" target="_blank"
class="enhancr_card_0550150209"
moz-do-not-send="true">Add missing size
hints and bug fix point arrays for
non-linear cells (!4372) · Merge
Requests · VTK / VTK</a></div>
</div>
</div>
</div>
</div>
</div>
<div><br>
</div>
<div id="ydpec705842enhancr_card_0550150209"
class="ydpec705842yahoo-link-enhancr-card
ydpec705842ymail-preserve-class
ydpec705842ymail-preserve-style"
style="max-width:400px;font-family:"Helvetica
Neue", "Segoe UI", Helvetica, Arial,
sans-serif;"
data-url="https://gitlab.kitware.com/vtk/vtk/merge_requests/4372"
data-type="YENHANCER" data-size="MEDIUM"
contenteditable="false"><a
href="https://gitlab.kitware.com/vtk/vtk/merge_requests/4372"
style="text-decoration:none !important;color:#000
!important;"
class="ydpec705842yahoo-enhancr-cardlink"
rel="nofollow" target="_blank"
moz-do-not-send="true">
<table class="ydpec705842card-wrapper
ydpec705842yahoo-ignore-table"
style="max-width:400px;" border="0"
cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="400">
<table class="ydpec705842card
ydpec705842yahoo-ignore-table"
style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224,
228, 233);border-radius:2px;"
width="100%" border="0" cellspacing="0"
cellpadding="0">
<tbody>
<tr>
<td
class="ydpec705842card-primary-image-cell"
style="background-color: rgb(0, 0,
0); background-repeat: no-repeat;
background-size: cover; position:
relative; border-radius: 2px 2px
0px 0px; min-height: 175px;"
height="175"
background="https://s.yimg.com/lo/api/res/1.2/hRS7K7svOTtDkV..yyh3rA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://gitlab.kitware.com/uploads/-/system/project/avatar/13/vtk_logo-main1.png.cf.jpg"
valign="top" bgcolor="#000000"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/hRS7K7svOTtDkV..yyh3rA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://gitlab.kitware.com/uploads/-/system/project/avatar/13/vtk_logo-main1.png.cf.jpg"/></v:rect><![endif]-->
<table
class="ydpec705842card-overlay-container-table
ydpec705842yahoo-ignore-table"
style="width:100%;" border="0"
cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td
class="ydpec705842card-overlay-cell"
style="background-color:
transparent;
border-radius: 2px 2px 0px
0px; min-height: 175px;"
background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"
valign="top"
bgcolor="transparent"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]-->
<table
class="ydpec705842yahoo-ignore-table"
style="width: 100%;
min-height: 175px;"
height="175" border="0">
<tbody>
<tr>
<td
class="ydpec705842card-richInfo2"
style="text-align:left;padding:15px 0 0 15px;vertical-align:top;"><br>
</td>
<td
class="ydpec705842card-actions"
style="text-align:right;padding:15px 15px 0 0;vertical-align:top;"><br>
</td>
</tr>
</tbody>
</table>
<!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<table class="ydpec705842card-info
ydpec705842yahoo-ignore-table"
style="background-color:
rgb(255, 255, 255);
background-image: none;
background-repeat: repeat;
background-attachment: scroll;
background-size: auto auto;
position: relative; z-index: 2;
width: 100%; max-width: 400px;
border-radius: 0px 0px 2px 2px;
border-top: 1px solid rgb(224,
228, 233);" border="0"
cellspacing="0" cellpadding="0"
align="center">
<tbody>
<tr>
<td
style="background-color:#ffffff;padding:16px
0 16px
12px;vertical-align:top;border-radius:0
0 0 2px;"><br>
</td>
<td
style="vertical-align:middle;padding:12px
24px 16px
12px;width:99%;font-family:"Helvetica
Neue", "Segoe
UI", Helvetica,
Arial,
sans-serif;border-radius:0
0 2px 0;">
<h2
class="ydpec705842card-title"
style="font-size:14px;line-height:19px;margin:0 0 6px
0;font-family:"Helvetica
Neue", "Segoe
UI", Helvetica,
Arial,
sans-serif;word-break:break-word;color:#26282a;">Add
missing size hints and
bug fix point arrays for
non-linear cells (!4...</h2>
<p
class="ydpec705842card-description"
style="font-size:12px;line-height:16px;margin:0px;color:#979ba7;word-break:break-word;">I've
added size hints for
concrete public methods
GetParametricCoords(),
GetEdgePoints() and
GetFacePoints() in ...</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</a></div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<div><br>
</div>
<div class="ydp7083d2e0signature">
<div style="font-size:16px;font-family:Helvetica, Arial,
sans-serif;">
<div>Todd Martin, PhD.<br>
</div>
<div><i>Freelance Engineer/Software Architect.</i></div>
<br>
</div>
</div>
</div>
</div>
</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Search the list archives at: <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtk-developers">http://markmail.org/search/?q=vtk-developers</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="https://public.kitware.com/mailman/listinfo/vtk-developers">https://public.kitware.com/mailman/listinfo/vtk-developers</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Paul D. Hahn
CompIntense HPC, LLC
</pre>
</body>
</html>