> > I think what you're looking for is a Visitor.
>
> Thanks for the links about reflection visitor. I used an
> approach very much like that when implementing multiple xml
> format reader/writers for a single object model.
>
> But my main issue is if-else-if structures based on type, not
> the example code in particular. Let's say the object model
> I'm processing is not modifiable (third-party etc) so I
> cannot put a visitor pattern or else into them.

        A couple of people, including yours truly, have suggested 
interfaces/strategy pattern-esk approaches. Have you thought about
these too? Your problem is typical for that pattern to solve.

                FB


===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to