[Smtk-developers] Proposed Change to Attribute and Attribute Group Item Classes

Robert Michael O'Bara bob.obara at kitware.com
Fri Jul 17 14:21:38 EDT 2015


Hi All,

Some time ago a set of findXXX methods were add to the Attribute class in order to make accessing items easier.  For example findDouble(“a") would return a DoubleItemPtr whose name is a.  There is also a templated method called findAs which does pretty much the same thing findAs<DoubleItem>(“a”)

When this was done, the developer failed to notice that GroupItems also behave like Attributes in that they also contain Items and as a result it only has the original find() method.

I figured the reason that we have the explicit findXXX methods was to provide Python wrappings since the original findAs method could not be wrapped directly.  However, I discovered that there are Python  findAs methods being generated explicitly in the typesystem.xml (findAsDouble for example).

As a result we have findXXX and findAs style methods being used in both C++ and Python code.  I would like there to be only one style for each.
 
What I propose is that the findXXX methods be removed from the Attribute class and just leave the findAs template (and add it to GroupItem).  Also to add the findAs methods in the GroupItem Python wrapping.

Any comments?

Bob

Robert M. O'Bara, MEng.
Assistant Director of Scientific Computing

Kitware Inc.
28 Corporate Drive
Suite 101
Clifton Park, NY 12065

Phone: (518) 881- 4931




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20150717/5750d7a0/attachment.html>


More information about the Smtk-developers mailing list