Article View: borland.public.cppbuilder.oodesign
Article #72Re: Should I use a Factory Design pattern ?
From: Simon Guertin
Date: Wed, 13 Sep 2006 21:17
Date: Wed, 13 Sep 2006 21:17
20 lines
1715 bytes
1715 bytes
Mark Guerrieri wrote: >>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 > > Thanks! Simon
Technical Details
Message-ID:
<45087532@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44b3e5b9$1@newsgroups.borland.com> <44bc4de6$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 Date: Wed, 13 Sep 2006 17:17:44 -0400 From: Simon Guertin <sguertin_AT@trellianetworks.com> User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.oodesign Subject: Re: Should I use a Factory Design pattern ? References: <44b3e5b9$1@newsgroups.borland.com> <44bc4de6$1@newsgroups.borland.com> In-Reply-To: <44bc4de6$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 70.50.240.227 Message-ID: <45087532@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1158182194 70.50.240.227 (13 Sep 2006 14:16:34 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail