edu.cmu.sei.aadl.instance
Class CreateEndToEndFlowsSwitch

java.lang.Object
  extended by edu.cmu.sei.aadl.model.util.ForAllAObject
      extended by edu.cmu.sei.aadl.model.util.AadlProcessingSwitch
          extended by edu.cmu.sei.aadl.model.util.AadlProcessingSwitchWithProgress
              extended by edu.cmu.sei.aadl.instance.CreateEndToEndFlowsSwitch

public class CreateEndToEndFlowsSwitch
extends AadlProcessingSwitchWithProgress


Field Summary
 
Fields inherited from class edu.cmu.sei.aadl.model.util.AadlProcessingSwitchWithProgress
monitor
 
Fields inherited from class edu.cmu.sei.aadl.model.util.AadlProcessingSwitch
componentSwitch, connectionSwitch, copyright, coreSwitch, DONE, featureSwitch, flowSwitch, INSTANCE, instanceSwitch, NOT_DONE, propertySwitch, self
 
Fields inherited from class edu.cmu.sei.aadl.model.util.ForAllAObject
DEFAULT_DEFAULT_TRAVERSAL, NO_DEFAULT, PROCESS_BOTTOM_UP_COMPONENT_IMPL, PROCESS_POST_ORDER_ALL, PROCESS_PRE_ORDER_ALL, PROCESS_TOP_DOWN_COMPONENT_CLASSIFIER, PROCESS_TOP_DOWN_COMPONENT_IMPL, resultList
 
Constructor Summary
CreateEndToEndFlowsSwitch(org.eclipse.core.runtime.IProgressMonitor pm, AnalysisErrorReporterManager errMgr)
           
 
Method Summary
protected  void addFlowStepInstance(EndToEndFlowInstance etei, ComponentInstance ci, FlowSpec fs)
          add a component instance/flowspec instance to the end to end flow instance if there is a previous such pair, first find and add the connection instance
protected  void createEndToEndFlowInstance(ComponentInstance ci, EndToEndFlow ete)
           
protected  void doProcessFlowImpl(EndToEndFlowInstance etei, ComponentInstance ci, FlowImpl fsq)
          instantiate a flow implementation by recursively processing its flow specifications
protected  void doProcessFlowSpec(EndToEndFlowInstance etei, ComponentInstance ci, FlowSpec fs)
          instantiate a flow specification by recursively following its implementation until a leaf element is reached In case of a leaf element add it as a flow step
protected  void fillinModes(EndToEndFlowInstance etei)
           
protected  org.eclipse.emf.common.util.EList getModeInstances(ComponentInstance ci, org.eclipse.emf.common.util.EList mlist)
          build mode instance list from mode list relaive to the component instance ci
protected  void initSwitches()
          Subclasses override this method to set the switch fields AadlProcessingSwitch.coreSwitch,AadlProcessingSwitch.componentSwitch, AadlProcessingSwitch.connectionSwitch,AadlProcessingSwitch.featureSwitch,AadlProcessingSwitch.flowSwitch, AadlProcessingSwitch.instanceSwitch, and AadlProcessingSwitch.propertySwitchto analysis-specific switch implementations.
protected  void processETE(ComponentInstance ci, EndToEndFlow ete, EndToEndFlowInstance etei)
           
 
Methods inherited from class edu.cmu.sei.aadl.model.util.AadlProcessingSwitchWithProgress
checkIfCancelled
 
Methods inherited from class edu.cmu.sei.aadl.model.util.AadlProcessingSwitch
getComponentSwitch, getConnectionSwitch, getCoreSwitch, getFeatureSwitch, getFlowSwitch, getInstanceSwitch, getPropertySwitch, process
 
Methods inherited from class edu.cmu.sei.aadl.model.util.ForAllAObject
action, cancelled, cancelTraversal, defaultTraversal, defaultTraversal, defaultTraversalAllDeclarativeModels, defaultTraversalAllInstances, error, error, getErrorManager, getResultList, info, info, internalError, internalError, notCancelled, processAllComponentImpl, processBottomUpComponentImpl, processBottomUpComponentImpl, processEList, processObject, processPostOrderAll, processPostOrderAll, processPostOrderAll, processPostOrderAllDeclarativeModels, processPostOrderAllInstances, processPostOrderComponentInstance, processPostOrderComponentInstance, processPreOrderAll, processPreOrderAll, processPreOrderAll, processPreOrderAllDeclarativeModels, processPreOrderAllInstances, processPreOrderComponentInstance, processPreOrderComponentInstance, processResources, processResources, processResourcesIgnoreFailure, processTopDownComponentClassifier, processTopDownComponentClassifierAllDeclarativeModels, processTopDownComponentImpl, processTopDownComponentImpl, processTree, processTreeIgnoreFailure, suchThat, warning, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateEndToEndFlowsSwitch

public CreateEndToEndFlowsSwitch(org.eclipse.core.runtime.IProgressMonitor pm,
                                 AnalysisErrorReporterManager errMgr)
Method Detail

initSwitches

protected final void initSwitches()
Description copied from class: AadlProcessingSwitch
Subclasses override this method to set the switch fields AadlProcessingSwitch.coreSwitch,AadlProcessingSwitch.componentSwitch, AadlProcessingSwitch.connectionSwitch,AadlProcessingSwitch.featureSwitch,AadlProcessingSwitch.flowSwitch, AadlProcessingSwitch.instanceSwitch, and AadlProcessingSwitch.propertySwitchto analysis-specific switch implementations. Implementaions should take care, however, as this method is invoked by the constructor AadlProcessingSwitch.AadlProcessingSwitch(). Only the switches that are actually needed need to be initialized, as the switch fields are previously inialized to default do-nothing switch implementations.

Specified by:
initSwitches in class AadlProcessingSwitch

createEndToEndFlowInstance

protected void createEndToEndFlowInstance(ComponentInstance ci,
                                          EndToEndFlow ete)

processETE

protected void processETE(ComponentInstance ci,
                          EndToEndFlow ete,
                          EndToEndFlowInstance etei)

doProcessFlowSpec

protected void doProcessFlowSpec(EndToEndFlowInstance etei,
                                 ComponentInstance ci,
                                 FlowSpec fs)
instantiate a flow specification by recursively following its implementation until a leaf element is reached In case of a leaf element add it as a flow step

Parameters:
etei - End to end flow instance
ci - the component whose flow specification is to be processed
fs - the flow specification to be processed

getModeInstances

protected org.eclipse.emf.common.util.EList getModeInstances(ComponentInstance ci,
                                                             org.eclipse.emf.common.util.EList mlist)
build mode instance list from mode list relaive to the component instance ci

Parameters:
ci - Component Instance
mlist - mode list
Returns:
list of mode instances

doProcessFlowImpl

protected void doProcessFlowImpl(EndToEndFlowInstance etei,
                                 ComponentInstance ci,
                                 FlowImpl fsq)
instantiate a flow implementation by recursively processing its flow specifications

Parameters:
etei - the end to end flow instance
ci - the component instance whose flow implementation is being processed
fsq - the flow implementation to be processed

addFlowStepInstance

protected void addFlowStepInstance(EndToEndFlowInstance etei,
                                   ComponentInstance ci,
                                   FlowSpec fs)
add a component instance/flowspec instance to the end to end flow instance if there is a previous such pair, first find and add the connection instance

Parameters:
etei - end to end flow instance
ci - component instance who flow spec is to be added
fs - the flow spec to be added

fillinModes

protected void fillinModes(EndToEndFlowInstance etei)