gang-of-4-patterns AT lists.siebelschool.illinois.edu
Subject: Design Patterns discussion
List archive
- From: oleg shteynbuk <oshteynbuk AT nyc.rr.com>
- To: rajesh AT cs.iitm.ernet.in
- Cc: gang-of-4-patterns AT cs.uiuc.edu
- Subject: Re: [gang-of-4-patterns] Doubt on Composite pattern (GOF)
- Date: Sat, 15 Nov 2003 13:47:07 -0500
- List-archive: <http://mail.cs.uiuc.edu/pipermail/gang-of-4-patterns/>
- List-id: Design Patterns discussion <gang-of-4-patterns.cs.uiuc.edu>
Rajesh,
not sure that I fully understand your question, composite is a tree and infinite loop could happens if your tree is cyclic but this is a problem of tree and not the pattern. Composite is actually one of the most often used patterns.
Oleg
rajesh AT cs.iitm.ernet.in
wrote:
Hello,
I have a doubt on Composite pattern. Does a composite pattern have more than one composite class ? If not, why? If so, what are the applications that it contains ?
I feel that if we have two composite classes we will get into infinite loop because one composite class will make a call to all the subclasses(of component)operation and as it makes a call to other composite class (one of the subclass of component) operation method it in turn make calls to all other subclasses operation and so on. Is it correct ?
Looking forward for ur reply
rajesh
- [gang-of-4-patterns] Doubt on Composite pattern (GOF), rajesh, 11/15/2003
- Re: [gang-of-4-patterns] Doubt on Composite pattern (GOF), oleg shteynbuk, 11/15/2003
- Re: [gang-of-4-patterns] Doubt on Composite pattern (GOF), Bangels Stefan, 11/15/2003
Archive powered by MHonArc 2.6.16.