|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.transform.core.AbstractTransformElement
com.ibm.xtools.transform.core.AbstractRule
com.ibm.xtools.transform.uml2.cpp.CPPExtendFramework
com.ibm.xtools.transform.uml2.cpp.CPPExtendRule
com.ibm.xtools.transform.uml2.cpp.CPPExtendEnumerationRule
This class provides common functionality for the extensibility of the transformation of UML2 Enumerations into a C++ code. The source property of the rule context is expected to be a UML2 Enumeration.
Constructor Summary | |
CPPExtendEnumerationRule(String id)
Constructor. |
Method Summary | |
protected boolean |
addAttribute(String name,
String constantExpression,
String comment,
ITransformContext ruleContext)
Adds enumeration attribute with the specified properties to the generated C++ enumeration. |
boolean |
canAccept(ITransformContext context)
The implementation of this method filters out contexts with inappropriate source elements, then calls canAcceptExt to provide additional filtering capabilities. |
protected org.eclipse.uml2.Enumeration |
getSourceEnumeration(ITransformContext context)
Returns UML2 enumeration to be processed, if any. |
Methods inherited from class com.ibm.xtools.transform.uml2.cpp.CPPExtendRule |
addBodyPrefix, addBodySuffix, addHeaderPrefix, addHeaderSuffix, isNested |
Methods inherited from class com.ibm.xtools.transform.uml2.cpp.CPPExtendFramework |
canAcceptExt, createTarget, createTargetExt |
Methods inherited from class com.ibm.xtools.transform.core.AbstractRule |
execute, findTarget, isSourceConsumed, mapTarget, toString, updateTarget |
Methods inherited from class com.ibm.xtools.transform.core.AbstractTransformElement |
getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CPPExtendEnumerationRule(String id)
id
- A unique identifier for the rule.Method Detail |
public boolean canAccept(ITransformContext context)
CPPExtendFramework
canAccept
in class CPPExtendFramework
context
- this rule execution contextprotected final boolean addAttribute(String name, String constantExpression, String comment, ITransformContext ruleContext)
name
- The attribute's name.constantExpression
- The attribute's initializer expression.comment
- Comments to be added to the generated attribute. Set to null if this attribute
has no comments.ruleContext
- This rule execution context. Must not be null.protected final org.eclipse.uml2.Enumeration getSourceEnumeration(ITransformContext context)
context
- The rule execution context.
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.