UML-to-Real-Time-C++ transformation extensions

You can create a transformation extension that extends an existing transform by adding an ExtendTransform element to the manifest file of the transformation extension and to the TransformationExtension element that defines the target transformation.

UML2CppTransform

The class, datatype and enumeration transforms are enhancements over Rational Rose® RealTime which does not support classifiers nested with capsule classes. A transform in square brackets signifies that the transform is not directly contained in the current transform, but is the target of a content extractor element within the current transform.

UML2CppTransform is the top-level transform and has the following rules:

ExtendTransform elements Field Plug-ins
UML2CppTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.UML2CppTransform

InitializeRule

[NodeTransform]

Source java.util.List (contains org.eclipse.uml2.uml model, package, class, datatype, and enumeration)
TypeResolutionRule UpdateMarkersRule Target Container org.eclipse.core.resources.IContainer (in a project with C++ characteristics)
  Target com.ibm.xtools.cpp2.model.CPPWorkspace
UpdateSourceTransform    

NodeTransform

The NodeTransform transform iterates over the nodes in the graph of transformation configurations. The nodes define groupings of the UML elements: the groupings correspond to components in Rational Rose RealTime.

ExtendTransform elements Field Plug-ins
NodeTransform Identifier com.ibm.xtools.umldt.rt.transform. cpp.NodeTransform
NodeRule Source com.ibm.xtools.umldt.rt.transform.internal.model.TransformGraph.Node
[MainTransform] Target Container com.ibm.xtools.cpp2.model.CPPWorkspace
  Target com.ibm.xtools.cpp2.model.CPPContainer

The NodeRule rule creates the CPPContainer container, which receives all the source files for the source node. It also creates the source files that relate to the grouping that the transformation configuration defines. The source files contain common elements that all other source files that are produced for the group use and they define the necessary elements for use with the TargetRTS framework. For example, a C++ Executable node includes code to create the logical-to-physical thread mapping and provides the RTMain::entryPoint() method.

MainTransform

The MainTransform transform iterates over the UML source elements to build the in-memory C++ model. Transforms do not exist for models or packages, because elements of those containers were extracted to produce the production of the transformation configuration graph.

ExtendTransform elements Field Plug-ins
MainTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.NodeTransform
SourceFileRule Source org.eclipse.uml2.uml Class, Datatype, or Enumeration

CapsuleTransform

ProtocolTransform

PassiveClassifierTransform

Target Container com.ibm.xtools.cpp2.model.CPPContainer
SourceFileFinalizationRule Target com.ibm.xtools.cpp2.model.CPPSourceFile

The SourceFileRule rule creates the CPPSourceFile file that is populated by a transform, such as CapsuleTransform, ProtocolTransform, or others.

CapsuleTransform

The CapsuleTransform transform processes classes with the UMLRealTime::Capsule stereotype.

ExtendTransform elements Field Plug-ins
CapsuleTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.CapsuleTransform

CapsuleRule

CapsuleDescriptorRule

Source org.eclipse.uml2.uml.Class (with the UMLRealTime::Capsule stereotype)
[DependencyTransform] [GeneralizationTransform] [PassiveClassifierTransform] [CapsuleStatemachineTransform] [StructureTransform] [PartTransform] [PortTransform] [PropertyTransform] [OperationTransform] Target Container com.ibm.xtools.cpp2.model.CPPContainer
  Target com.ibm.xtools.cpp2.model.CPPCompositeType

ProtocolTransform

The ProtocolTransform transform processes packages with the UMLRealTime::Protocol stereotype.

ExtendTransform elements Field Plug-ins
ProtocolTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.ProtocolTransform
ProtocolRule Source com.ibm.xtools.umldt.rt.transform.cpp.ProtocolTransform
[DependencyTransform] [GeneralizationTransform] Target Container com.ibm.xtools.cpp2.model.CPPContainer
  Target com.ibm.xtools.cpp2.model.CPPCompositeType

PassiveClassifierTransform

The PassiveClassifierTransform transform processes passive classifiers without the UMLRealTime::Capsule stereotype.

ExtendTransform elements Field Plug-ins
ClassTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.ClassTransform

ClassTransform

DataTypeTransform

EnumerationTransform

Source org.eclipse.uml2.uml.Class (without the UMLRealTime::Capsule stereotype)
Target Container com.ibm.xtools.cpp2.model.CPPContainer
  Target com.ibm.xtools.cpp2.model.CPPCompositeType

ClassTransform

The ClassTransform transform processes classes without the UMLRealTime::Capsule stereotype.

ExtendTransform elements Field Plug-ins
ClassTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.ClassTransform

ClassRule

ClassDescriptorRule

SpecialOperationsRule

Source org.eclipse.uml2.uml.Class (without the UMLRealTime::Capsule stereotype)
[DependencyTransform] [GeneralizationTransform] [PassiveClassifierTransform] [PassiveStatemachineTransform] [PropertyTransform] [OperationTransform] Target Container com.ibm.xtools.cpp2.model.CPPContainer
  Target com.ibm.xtools.cpp2.model.CPPCompositeType

DataTypeTransform

The DataTypeTransform transform processes datatypes, excluding enumerations.

ExtendTransform elements Field Plug-ins
DataTypeTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.DataTypeTransform

DataTypeRule

DataTypeDescriptorRule

Source org.eclipse.uml2.uml.DataType
[DependencyTransform] [GeneralizationTransform] [PropertyTransform] [OperationTransform] Target Container com.ibm.xtools.cpp2.model.CPPContainer
  Target com.ibm.xtools.cpp2.model.CPPCompositeType

EnumerationTransform

The EnumerationTransform transform processes enumerations.

ExtendTransform elements Field Plug-ins
EnumerationTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.EnumerationTransform

EnumerationRule

EnumerationDescriptorRule

Source org.eclipse.uml2.uml.Enumeration
[DependencyTransform] [GeneralizationTransform] [EnumerationLiteralTransform] [PropertyTransform] [OperationTransform] Target Container com.ibm.xtools.cpp2.model.CPPContainer
  Target com.ibm.xtools.cpp2.model.CPPEnum

DependencyTransform

The DependencyTransform transform processes dependencies between classifiers or protocols.

ExtendTransform elements Field Plug-ins
DependencyTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.DependencyTransform
DependencyRule Source org.eclipse.uml2.uml.Dependency
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target null

EnumerationLiteralTransform

The EnumerationLiteralTransform transform processes enumeration literals.

ExtendTransform elements Field Plug-ins
EnumerationLiteralTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.EnumerationLiteralTransform
EnumerationLiteralRule Source org.eclipse.uml2.uml.EnumerationLiteral
Target Container com.ibm.xtools.cpp2.model.CPPEnum
  Target com.ibm.xtools.cpp2.model.CPPEnumLiteral

GeneralizationTransform

The GeneralizationTransform transform processes generalizations between UML classifiers.

ExtendTransform elements Field Plug-ins
GeneralizationTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.GeneralizationTransform
GeneralizationRule Source org.eclipse.uml2.uml.Generalization
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target com.ibm.xtools.cpp2.model.CPPInheritance

PassiveStatemachineTransform

The PassiveStatemachineTransform transform processes state machines in passive classes.

ExtendTransform elements Field Plug-ins
PassiveStatemachineTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.PassiveStatemachineTransform
PassiveStatemachineRule Source org.eclipse.uml2.uml.Statemachine
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target  

OperationTransform

The OperationTransform transform processes operations.

ExtendTransform elements Field Plug-ins
OperationTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.OperationTransform
OperationRule Source org.eclipse.uml2.uml.Operation
ParameterTransform Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target com.ibm.xtools.cpp2.model.CPPFunction

ParameterTransform

The ParameterTransform transform processes operation parameters.

ExtendTransform elements Field Plug-ins
ParameterTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.ParameterTransform
ParameterRule Source org.eclipse.uml2.uml.Parameter
Target Container com.ibm.xtools.cpp2.model.CPPFunction
  Target com.ibm.xtools.cpp2.model.CPPFunctionParameter

PropertyTransform

The PropertyTransform transform processes properties.

ExtendTransform elements Field Plug-ins
PropertyTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.PropertyTransform
PropertyRule Source org.eclipse.uml2.uml.Property
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target com.ibm.xtools.cpp2.model.CPPVariable

StructureTransform

The StructureTransform transform processes the structure of a capsule.

ExtendTransform elements Field Plug-ins
StructureTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.StructureTransform
StructureRule Source org.eclipse.uml2.uml.Class (with the UMLRealTime::Capsule stereotype)
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target  

CapsuleStatemachineTransform

The CapsuleStatemachineTransform transform processes capsule state machines.

ExtendTransform elements Field Plug-ins
CapsuleStatemachineTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.CapsuleStatemachineTransform
CapsuleStatemachineRule Source org.eclipse.uml2.uml.Statemachine
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target  

PartTransform

The PartTransform transform processes parts of capsules.

ExtendTransform elements Field Plug-ins
PartTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.PartTransform
PartRule Source org.eclipse.uml2.uml.Property (with capsule type)
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target com.ibm.xtools.cpp2.model.CPPVariable

PortTransform

The PortTransform transform processes ports of capsules.

ExtendTransform elements Field Plug-ins
PortTransform Identifier com.ibm.xtools.umldt.rt.transform.cpp.PortTransform
PortRule Source org.eclipse.uml2.uml.Port
Target Container com.ibm.xtools.cpp2.model.CPPCompositeType
  Target com.ibm.xtools.cpp2.model.CPPVariable

You can add an ExtendTransform element by editing the plugin.xml file of the plug-in that contains the transformation extension. The ExtendTransform element must contain an attribute called targetTransform and optional attributes called name and id.

The following code shows how the ExtendTransform element can look:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension
         point="com.ibm.xtools.transform.core.transformationExtensions">
      <TransformationExtension
            author="ma"
            description="uml2cpptransformext"
            id="testrtxx.transformationExtension"
            name="Transformation Extension"
            targetTransformation="com.ibm.xtools.umldt.rt.transform.cpp.UML2CppTransform "
            version="1.0.0">
         <TransformDefinition
               id="com.ibm.xtools.umldt.rt.transform.cpp.UML2CppTransform"
               name="uml2cpp">
         </TransformDefinition>
         <ExtendTransform
               id="com.ibm.xtools.umldt.rt.transform.cpp.UML2CppTransform"
               targetTransform="com.ibm.xtools.umldt.rt.transform.cpp.UML2CppTransform">
         </ExtendTransform>      </TransformationExtension>
   </extension>

</plugin>

Feedback