|
Annex B: Design PatternsB1.Abstract FactoryDescriptionWhen various families of related objects have to be represented while masking their differences with the customers, this pattern proposes the definition of a centralised abstract interface of creation of a set of objects which can be specialised. Structure and Components
Structure and Components of the Abstract Factory design pattern
Collaborations
Strengths and Weaknessesthe maintenance of the coherence between objects is favoured, the substitution of a concrete class by another is facilitated and remains transparent for the client, if the direct co-operation between the concrete objects is necessary, these objects are made less reusable and interchangeable. Use in CBR*ToolsObjects necessary to the reasoning (phase of reasoning, target case, objects backing up the state of the reasoning, etc.) represent a family whose coherence should be assured. This is why, an abstract factory ( ReasonerFactory class) is used to join together the operations of creation of these objects. This factory is specialised ( TimeExtendedReasonerFactory class) in order to declare the operations of creation of specific objects for the indexing by behavioural situations. Brigitte Trousse Last modified: Fri Sep 28 13:51:13 MEST 2001 |