[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] adding constant to the operations properties



Hi Matthieu.

My $0.02 on the subject:

1) Constant operations: why not use the boolean value
   specified in the UML 1.4 spec, p. 81:

     isQuery

     Specifies whether an execution of the Feature
     leaves the state of the system unchanged. True
     indicates that the state is unchanged; false
     indicates that side-effects may occur.


2) Final operations: why not use the boolean value specified
   on p. 102:

     isLeaf

     If true, then the implementation of the
     operation may not be overriden by a descendant
     class. If false, then the implementation of the
     operation may be overridden by a descendant
     class (but it need not be overridden).


3) Virtual operations: this one's a bit trickier.  My
   personal preference (being a stickler for UML
   conformance) would be to use a stereotype or a tagged
   value to represent the virtual nature of an Operation.
   However, this presents 2 new problems:

     1) stereotypes can't currently be applied to
        attributes or operations in Dia; and

     2) tagged values are nowhere to be seen in
        Dia.

   I am interested in rectifying this situation
   and can probably whip up the code for stereotypes
   and tagged values in a few days, if you're
   interested.  However it may not be ideal for
   Dia2code; extra logic would be required to search
   for the specific tagged value or stereotype that
   denotes virtual-ness.

   The miscellaneous advantages of having tagged
   values and stereotypes for attributes & operations
   would include all the pre-defined ones listed in the
   UML spec:

     Standard Element   Applies To   Usage
     ---------------------------------------------
     <<create>>         Operation    constructors
     <<destroy>>        Operation    destructors
     persistence        Attribute    "transitory" or
                                     "persistent" (for
                                     example, for
                                     use with an EJB)
     semantics          Operation    specifies the
                                     meaning of the
                                     Operation (sort
                                     of a comment)

   Also the following would probably be useful for
   programs like Dia2Code:

     <<primaryKey>>     Attribute    for DBs
     <<unique>>         Attribute    "   "
     <<cdata>>          Attribute    for XML schemas
                                     and DTDs

Anyway that's my rather long-winded $0.02.

Cheers,

Johann


dia-list-request@gnome.org wrote:
> Message: 1
> Date: Mon, 28 Jan 2002 00:53:18 +0100
> From: Matthieu Sozeau <sozeau@club-internet.fr>
> To: Dia mailing list <dia-list@gnome.org>
> Subject: [PATCH] adding constant to the operations properties
> Organization: /home
> Reply-To: dia-list@gnome.org
> 
> This is a little patch to add the constant property to an UML class operation. Although that's not standard UML, i find it usefull for C++ code output and for clarity of the interfaces :). I will add such support to dia2code now.
> I was wondering if I could add the final and virtual properties to methods (operations) in the UML module. Perhaps most of users don't want it, so I'm just asking (at lease I'll add it for me).
> 
> Note: The patch must be applied in objects/UML as you certainly deduced.

<SNIP/>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK