|
-
April 27th, 2010, 02:19 AM
#1
Looking for a neat way to accomplish this type problem
I have a design issue which I've had in the past and never really found a satisfactory solution for, so I was hoping to get some fresh ideas on how to handle it.
I have a list of objects. Each object is of a different dervied type, but they all inherit from a common base class.
I have a GUI which needs to show the properties of each object in the list. The exact layout of each section of the GUI depends on the derived class type of the object.
In the past I have basically used typeid(...) and a bunch of conditional branches to determine which layout I use, but this feels clunky to me.
Does anybody have a neat solution they'd be prepared to share?
Cheers,
BJW
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|