Jump to content
  • Advertisement
Sign in to follow this  
derek7

abstract factory

This topic is 4507 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Use the Abstract Factory pattern when 1 a system should be independent of how its products are created, composed, and represented. ......... 4 you want to provide a class library of products, and you want to reveal just their interfaces, not their implementations. I am curious class itself just have the "capacity" that reveral interface to client and hide the implementation. what is wrong ?

Share this post


Link to post
Share on other sites
Advertisement
Suppose there is a Product interface with different implementations and some code that mostly deals with generic Product objects through the Product interface but also needs to create them: introducing occasional dependencies from random implementations isn't nice.
An abstract factory that decides which Product implementations should be created in different circumstances provides a single location for such creational policies and allows the client to depend only on the Product interface and its factory instead than on Product and all its implementations.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Your words didn't make any sense. Try again.


I recall,maybe it is because new operator do not support class virtual hierarchy

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!