<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">We discussed having Attribute Definitions also be a Resource Component (like Attribute). After some thought I think this is not a good idea for the following reasons:<div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">Definitions would have a UUID assigned to them as well. The complication this introduces is that currently all attribute template files are written by hand and would not initially have one</li><li class="">Technically an attribute template is for the creating of a new attribute system so what would it mean for definitions to a a UUID that is the same for different attribute systems.</li></ul><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Comments?</div><div class=""><br class=""></div><div class="">Bob</div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Robert M. O'Bara, MEng.<br class="">Assistant Director of Scientific Computing<br class=""><br class="">Kitware Inc.<br class="">28 Corporate Drive<br class="">Suite 101<br class="">Clifton Park, NY 12065<br class=""><br class="">Phone: (518) 881- 4931</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Aug 16, 2017, at 5:48 PMEDT, Bob Obara <<a href="mailto:bob.obara@kitware.com" class="">bob.obara@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">My main question concerning ResourceComponent::type is should it be a superset of all the model entity types along with Attribute, Attribute Definition, Mesh Field, Mesh PointSet, Mesh Cell Set? This would mean needing to conform to SMTK Models’ bit encoded pattern.<div class=""><br class=""></div><div class="">I think for now we could just use a enum class for Resource::Type.</div><div class=""><br class=""></div><div class="">Bob</div><div class=""><br class=""><div class="">
<div style="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Robert M. O'Bara, MEng.<br class="">Assistant Director of Scientific Computing<br class=""><br class="">Kitware Inc.<br class="">28 Corporate Drive<br class="">Suite 101<br class="">Clifton Park, NY 12065<br class=""><br class="">Phone: (518) 881- 4931</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 16, 2017, at 9:29 AMEDT, Haocheng Liu <<a href="mailto:haocheng.liu@kitware.com" class="">haocheng.liu@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi David,<div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Aug 16, 2017 at 9:18 AM, David Thompson <span dir="ltr" class=""><<a href="mailto:david.thompson@kitware.com" target="_blank" class="">david.thompson@kitware.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> I’ve started modifying the existing Resource class and have a question as to how SMTK should return the Resource’s Type (model, mesh, attribute, etc..) - The class currently uses an enum which is fast and does enforce uniformity but will require new types of resources to modify the base class to add new enum (like VTK) . We also could just return a string which would be more flexible but is a bit slower to compare.<br class="">
<br class="">
</span>At the resource level, strings seem to make a lot more sense because it doesn't feel like we've finished the list of resource types yet (candidates might be: simulation, job, view, workflow template).<br class="">
<span class=""><br class="">
> The same question pertains to the type of ResourceComponents.<br class="">
<br class="">
</span>Can we use dynamic casting of the parent resource or some other formalism to avoid the string comparison at the component level? That way things in tight loops would be fast but we would still be flexible. I worry that if we start with an enum and then add cases all the pre-existing switch statements would add fragility; people seem to deal with strings a little more defensively than enums.<br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class=""></font></span></blockquote><div class="">How about using C++11 strong type enum? I've already started using them in smtk for the past months. It's type-safe, fast and flexible. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888" class="">
David<br class="">
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr class="">_________________<br class="">
Smtk-developers mailing list<br class="">
<a href="mailto:Smtk-developers@smtk.org" class="">Smtk-developers@smtk.org</a><br class="">
<a href="http://public.kitware.com/mailman/listinfo/smtk-developers" rel="noreferrer" target="_blank" class="">http://public.kitware.com/<wbr class="">mailman/listinfo/smtk-<wbr class="">developers</a><br class="">
</div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Best regards<div class="">Haocheng</div><div class=""><br class=""></div><div class="">Haocheng LIU</div><div class=""><span style="font-size: 12.8px;" class="">Kitware, Inc.</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">R&D Engineer</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">21 Corporate Drive</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Clifton Park, NY 12065-8662</span><br style="font-size: 12.8px;" class=""><span style="font-size: 12.8px;" class="">Phone: </span><a href="tel:(518)%20881-4421" value="+15188814443" style="color:rgb(17,85,204);font-size:12.8px" target="_blank" class="">518-881-4421</a><br class=""></div></div></div></div></div>
</div></div>
</div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>