Re: dynamic object creation
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 13:32:04 +0200
"B.r.K.o.N.j.A." <thebrkonja@xxxxxxx> wrote in message
news:djsro1$arb$1@xxxxxxxxxxxxxxxxx
> All classes are descendent of one base class, they have no new methods
> just different implementations of base ones. Basicaly I need to get
> different calculation object according to value stored in database.
>
> Does this simplify things?
It does. You will have no probles with a solution based on class
references. The remaining trick is to get the right class reference
in the first place, based on your value from the database. You're
trying to avoid a linear search, whether it is your original repeated
if statement or a lookup table.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: dynamic object creation
- From: B.r.K.o.N.j.A.
- Re: dynamic object creation
- References:
- dynamic object creation
- From: B.r.K.o.N.j.A.
- Re: dynamic object creation
- From: Maarten Wiltink
- Re: dynamic object creation
- From: B.r.K.o.N.j.A.
- dynamic object creation
- Prev by Date: Re: dynamic object creation
- Next by Date: Re: dynamic object creation
- Previous by thread: Re: dynamic object creation
- Next by thread: Re: dynamic object creation
- Index(es):
Relevant Pages
|