[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kuml-devel
Subject: Re: Creating views
From: Darius Stachow <shiva () dialup ! nacamar ! de>
Date: 1999-12-31 12:37:05
[Download RAW message or body]
On Don, 30 Dez 1999, Jake wrote:
>If the diagram provides a
>concrete visitor implementation (I know, I know, lay off the visitor
>thing ;-) we could eliminate the need for RTTI in that particular case.
>There are lots of ways this could be done, this is just a suggestion. I
>do think it would be benifical to reuse the same inteface here. The
>diagram would just provide getElementVisitor() member or have it as a
>private member that it passes elements to internally (which ever is
>simpler in this case). Then the diagram would just have an
>"addElement(Properties* p)" (I know there has been some discussion about
>the use of properties as a common superclass of all elements, so this
>may change). When that method is called it would then pass that
>properties to a concrete visitor implementation that would create (or
>not) the appropriate drawing element. Here is an ascii sequence
>diagram.
Ok, correct me if I am wrong.
We will get a visitor class that will do the creation of the different views. I
will call it CreationVisitor in the below example:
CreationVisitor : public Visitor {
public:
virtual void operate(Classes*); // create a DrawingClass object
virtual void operate(GeneralizationRelationship*);/create aDrawingGeneralization
};
The operate method will create a view for the given data object and the
type will be recognized by the given paramenter object because of using
overloaded functions (the correct operate method will be used).
Do I correctly understand your suggestion ?
--
Open your mind ...
Darius Stachow
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic