IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.transform.uml2.cpp
Class CPPExtendRule

java.lang.Object
  extended bycom.ibm.xtools.transform.core.AbstractTransformElement
      extended bycom.ibm.xtools.transform.core.AbstractRule
          extended bycom.ibm.xtools.transform.uml2.cpp.CPPExtendFramework
              extended bycom.ibm.xtools.transform.uml2.cpp.CPPExtendRule
All Implemented Interfaces:
ITransformationItem
Direct Known Subclasses:
CPPExtendClassifierRule, CPPExtendEnumerationRule

public abstract class CPPExtendRule
extends CPPExtendFramework

This class contains common functionality for the UML to C++ transformation extensibility providing basic text functions.


Constructor Summary
CPPExtendRule(String id)
          Constructor.
 
Method Summary
protected  boolean addBodyPrefix(String prefix, ITransformContext ruleContext)
          Add text to the beginning of the body (.cpp) file.
protected  boolean addBodySuffix(String suffix, ITransformContext ruleContext)
          Add text to the end of the body (.cpp) file.
protected  boolean addHeaderPrefix(String prefix, ITransformContext ruleContext)
          Add text to the beginning of the header (.h) file.
protected  boolean addHeaderSuffix(String suffix, ITransformContext ruleContext)
          Add text to the end of the header (.h) file.
protected  boolean isNested(ITransformContext context)
          Evaluates source property of the context to determine if it is a nested classifier.
 
Methods inherited from class com.ibm.xtools.transform.uml2.cpp.CPPExtendFramework
canAccept, 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

CPPExtendRule

public CPPExtendRule(String id)
Constructor.

Parameters:
id - A unique identifier for the rule.
Method Detail

addHeaderPrefix

protected final boolean addHeaderPrefix(String prefix,
                                        ITransformContext ruleContext)
Add text to the beginning of the header (.h) file.

Parameters:
prefix - Text to add to the beginning of the header file generated for this classifier.
ruleContext - This rule execution context. Must not be null.

addHeaderSuffix

protected final boolean addHeaderSuffix(String suffix,
                                        ITransformContext ruleContext)
Add text to the end of the header (.h) file.

Parameters:
suffix - Text to add to the end of the header file generated for this classifier.
ruleContext - This rule execution context. Must not be null.

addBodyPrefix

protected final boolean addBodyPrefix(String prefix,
                                      ITransformContext ruleContext)
Add text to the beginning of the body (.cpp) file.

Parameters:
prefix - Text to add to the beginning of the body file generated for this classifier.
ruleContext - This rule execution context. Must not be null.

addBodySuffix

protected final boolean addBodySuffix(String suffix,
                                      ITransformContext ruleContext)
Add text to the end of the body (.cpp) file.

Parameters:
suffix - Text to add to the end of the body file generated for this classifier.
ruleContext - This rule execution context. Must not be null.

isNested

protected final boolean isNested(ITransformContext context)
Evaluates source property of the context to determine if it is a nested classifier.

Parameters:
context - rule execution context
Returns:
true if the source element of the context is a nested classifier

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.