- Project tools
-
-
- Using ArgoUML
-
- The ArgoUML Project
-
- Nightly builds of docs
-
- The Stats Project
-
- How do I...
-
| Category |
Featured projects |
| scm |
Subversion,
Subclipse,
TortoiseSVN,
RapidSVN
|
| issuetrack |
Scarab |
| requirements |
xmlbasedsrs |
| design |
ArgoUML |
| techcomm |
SubEtha,
eyebrowse,
midgard,
cowiki |
| construction |
antelope,
scons,
frameworx,
build-interceptor,
propel,
phing
|
| testing |
maxq,
aut
|
| deployment |
current |
| process |
ReadySET |
| libraries |
GEF,
Axion,
Style,
SSTree
|
| Over 500 more tools... |
|
An enumeration is a primitive datatype
that can have a fixed short list of values.
It has no attributes,
and any operations on them must have no
side-effects. A useful analogy is the primitive datatype
boolean in a language like Java.
The boolean stands on its
own—it has no inner structure.
There are operations (for
example logical xor) on the booleans, but when I perform
true xor true the result is a new boolean,
and the original 2 booleans “true”
are unchanged by the exercise. Within UML 1.4, Enumeration is a
sub-class of the DataType metaclass.
The big difference with other DataTypes, is that an
Enumeration has EnumerationLiterals.
E.g. the Enumeration “boolean” is defined as
having 2 EnumerationLiterals, “true” and
“false”.
Within ArgoUML new enumerations may be created using the
New Enumeration button on the property tabs of
the model and packages (in which case the new enumeration is
restricted in scope to the package), as well as the properties
tab for datatype and enumeration.
Enumerations can also be created with the tool
in the diagram toolbar of a class diagram.
The UML 1.4 standard allows user defined
enumerations to be placed on class diagrams
to define their inheritence structure.
This is also possible in ArgoUML.
It is represented on the diagram by a box
with three compartments,
of which the top one is marked with
«enumeration»,
and contains the name.
The middle compartment shows the enumeration literals.
The lower one contains operations.
16.4.1. Enumeration Details TabsThe details tabs that are active for enumerations are as
follows. ToDoItemStandard tab. PropertiesSee
Section 16.4.2, “Enumeration Property Toolbar” and
Section 16.4.3, “Property Fields For Enumeration”
below. DocumentationStandard tab. See
Section 13.4, “Documentation Tab”. PresentationStandard tab.
SourceStandard tab.
StereotypeStandard tab. The UML metamodel has the following
stereotypes defined by default for a Classifier,
which also apply to an Enumeration:
metaclass (from the
superclass, Classifier).
powertype (from the
superclass, Classifier).
process (from the
superclass, Classifier).
thread (from the
superclass, Classifier).
utility (from the
superclass, Classifier).
Tagged ValuesStandard tab. In the UML metamodel,
Enumeration has no standard tagged
values defined.
16.4.2. Enumeration Property Toolbar
Go upNavigate up through the composition structure.
New datatypeThis creates a new datatype (see
Section 18.6, “Class”) within the same
package as the current enumeration.
New enumerationThis creates a new enumeration within the
same namespace as the current enumeration,
navigating immediately to the properties tab
for new enumeration.
New enumeration literalThis creates a new enumeration literal within the
enumeration, navigating immediately to the properties tab
for that literal.
New OperationThis creates a new operation within the enumeration,
navigating immediately to the properties tab for that
operation.
New StereotypeThis creates a new Stereotype (see
Section 16.6, “Stereotype”) within the same
package as the enumeration, navigating immediately to the
properties tab for that stereotype.
Delete from ModelThis deletes the datatype from the model.
16.4.3. Property Fields For EnumerationNameText box. The name of the enumeration. The primitive
enumerations all have lower case names, but there is no
formal convention. ![[Note]](images/note.png) | Note |
|---|
The default name supplied for a newly created
datatype is the empty string “”. Enumerations
with empty string names will appear with the name
(Unnamed Enumeration) in the
explorer. |
NamespaceDrop down selector with navigation button.
Allows changing the
namespace for the enumeration. This is the composition
hierarchy. ModifiersCheck box, with entries
Abstract, Leaf and
Root. Abstract is used to
declare that this enumeration cannot be instantiated,
but must always be specialized.
Leaf indicates that this
enumeration can have no further sub-types, while
Root indicates it is a top level
enumeration.
VisibilityRadio box, with entries
public, private,
protected, and
package. Records the visibility for the Enumeration. Client DependenciesText area. Lists any elements that depend on this
enumeration. Button 1 double click navigates to the
selected modelelement. Button 2 click brings up a pop up
menu with following entry. Supplier DependenciesText area. Lists any elements that this enumeration
depends on. Button 1 double click navigates to the
selected modelelement. Button 2 click brings up a pop up
menu with the following entry. GeneralizationsText area. Lists any enumeration that
generalizes this enumeration. SpecializationsText box. Lists any specialized enumerations (i.e.
for which this enumeration is a generalization. OperationsText area. Lists all the operations defined on
this enumeration. Button 1 double click navigates to the
selected operation. Button 2 click brings up a pop up
menu with two entries. Move Up. Only available
where there are two or more operations, and the
operation selected is not at the top. It is moved
up one.
Move Down. Only available
where there are two or more operations listed, and
the operation selected is not at the bottom. It is
moved down one.
See Section 18.8, “Operation” for
details of operations. ![[Caution]](images/caution.png) | Caution |
|---|
ArgoUML treats all operations as equivalent.
Any operations created here will use the same
mechanism as operations for classes. Remember that
operations on enumerations must have no side effects
(they are read-only). This means the
query modifier must be
checked for all operations. |
LiteralsText area. Lists all the enumeration literals
defined for this enumeration. Button 1 double click
navigates to the selected literal, button 2 click
brings up a pop up menu with two entries. Move Up. Only available
where there are two or more literals, and the
literal selected is not at the top. It is moved up
one.
Move Down. Only available
where there are two or more literals listed, and
the literal selected is not at the bottom. It is
moved down one.
|