POV-Ray : Newsgroups : povray.off-topic : Generics annoyance : Re: Generics annoyance Server Time
4 Sep 2024 07:18:06 EDT (-0400)
  Re: Generics annoyance  
From: Invisible
Date: 13 Apr 2010 11:36:52
Message: <4bc48f94$1@news.povray.org>
Darren New wrote:

> Actually, I think that clued me in a bit. They *are* all of type 
> "object". ;-)
> 
> So I could just have a list of objects, and when I get an update, 
> (dynamic)-cast each element to a IUpdatable and invoke that if it works; 
> when I get a draw, cast each to an IDrawable and invoke that if it 
> works, etc.
> 
> Ugly, but it'll do the trick, I think.

Ah yes, ye olde "upcast everything to Object" antipattern. :-D


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.