[Insight-developers] proper way to test for a superclass?
Michael Stauffer (Circular Logic)
mstauff at verizon.net
Wed Oct 13 11:23:48 EDT 2010
Hi Luis,
Yes sorry, that wasn't clear.
For example, I'd like to test at runtime that an object is a
MatrixOffsetTransformBase class, or a subclass thereof, to make sure it
has certain member functions. The issue comes from reading a transform
file using the transform file reader, and wanting to make sure the
output object is of the type or a subclass.
I can't see in the TransformFileReader class how I can tell or control
what kind of transform type it's returning, except for trying a dynamic
class. Am I missing some way to do so more properly? The documentation
doesn't seem to cover this.
Cheers,
Michael
_____
From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Sent: Wednesday, October 13, 2010 9:50 AM
To: Michael Stauffer (Circular Logic)
Cc: ITK-dev-list
Subject: Re: [Insight-developers] proper way to test for a superclass?
Hi Michael,
What do you mean by a "minimum superclass" ?
Please explain.
B B Thanks
B B B B B B B B Luis
---------------------------------------------------
On Tue, Oct 12, 2010 at 4:51 PM, Michael Stauffer (Circular Logic)
<mstauff at verizon.net> wrote:
Hi,
What's the proper way in ITK to test for a minimum superclass? I could
do a dynamic cast and check for NULL - is that acceptable? Thanks.
Cheers,
Michael
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20101013/79d016d1/attachment.htm>
More information about the Insight-developers
mailing list