Article View: borland.public.cppbuilder.oodesign
Article #71Re: Should I use a Factory Design pattern ?
From: Mark Guerrieri
Date: Tue, 18 Jul 2006 02:56
Date: Tue, 18 Jul 2006 02:56
12 lines
1594 bytes
1594 bytes
> I never used the factory design pattern and I would like to know if this > is an appropriate situation to use it and how should I design my License > key classes and subclasses? Sounds to me more like a straight forward OOP design would suffice. Abstract license key base class defines virtual methods for all fetaures, or even just a couple of virtual methods such as EnableFeatures, DisableFeatures, GetAvailableFeatures, etc. Create dervied classes that override the appropriate functions, and pass that into a generic method that will call the appropriate functions via polymorphism. Mark
Technical Details
Message-ID:
<44bc4de6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44b3e5b9$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10db1e,68a20bed5a8325 X-Google-Attributes: gid10db1e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mark Guerrieri" <mguerrieri@no_spam_verizon.net> Newsgroups: borland.public.cppbuilder.oodesign References: <44b3e5b9$1@newsgroups.borland.com> Subject: Re: Should I use a Factory Design pattern ? Date: Mon, 17 Jul 2006 22:56:40 -0400 Lines: 14 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 NNTP-Posting-Host: 71.248.209.167 Message-ID: <44bc4de6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1153191398 71.248.209.167 (17 Jul 2006 19:56:38 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail