Exforsys

Online Training

polimorphic factory & constructor arguments

This is a discussion on polimorphic factory & constructor arguments within the Software Patterns forums, part of the Testing category; any one knows how to deal when you need a polimorphic factory but some sub-factories need some kind of ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-19-2004, 10:16 AM
hernan rancati
Guest
 
Posts: n/a
polimorphic factory & constructor arguments

any one knows how to deal when you need a
polimorphic factory but some sub-factories
need some kind of constructor arguments??
(I mean in cases where product's default constructors
doesn't make any sense).

thanks a lot!

hernan rancati (cesare)

ps: i have some clue to solve the problem using a kind
of generic composite argument (an interface) but doesn't
convince me too much..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-22-2004, 12:52 AM
James Rafter
Guest
 
Posts: n/a
Re: polimorphic factory & constructor arguments

> any one knows how to deal when you need a
> polimorphic factory but some sub-factories
> need some kind of constructor arguments??
> (I mean in cases where product's default constructors
> doesn't make any sense).


How are the derived classes being determined and where would
the parameters for the non-default constructors come from?

Once that is known it will be easier to offer a suggestion.

Presumably, the client code using the constructed objects
knows nothing about the derived classes since it's only
knows of the base class.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.