ujf.verimag.bip.codegen
Class CBipVisitor

java.lang.Object
  extended by CBasicVisitor
      extended by ujf.verimag.bip.codegen.CBipVisitor
Direct Known Subclasses:
C2BIPVisitor, FindInteractionPointsVisitor

public abstract class CBipVisitor
extends CBasicVisitor

Visitor for the C language ASG created by the codegen library. This visitor only contains helpful methods for the handling of interaction points.


Field Summary
protected  java.util.Set<InteractionPoint> interaction_method_names
          Contains the list of methods considered as interactions with the outside of the newly created component
 
Constructor Summary
CBipVisitor()
           
 
Method Summary
 void addInteractionMethod(InteractionPoint methodName)
          Adds a new method to the set of C function considered as interaction methods.
 void addInteractionMethod(InteractionPoint[] points)
          Add a set of interaction point to the current set of interaction points.
 void clearInteractionMethods()
          Clears the set of the C function considered as interaction methods.
protected
<ReturnTypeClass extends CType>
InteractionPoint
getMatchForFunctionCall( fcall)
          Get the interaction point corresponding to a function call
protected
<ReturnTypeClass extends CType>
boolean
matchAnyFunctionCall( fcall)
          Test whether or not a given function call corresponds to an interaction point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interaction_method_names

protected java.util.Set<InteractionPoint> interaction_method_names
Contains the list of methods considered as interactions with the outside of the newly created component

Constructor Detail

CBipVisitor

public CBipVisitor()
Method Detail

addInteractionMethod

public void addInteractionMethod(InteractionPoint methodName)
Adds a new method to the set of C function considered as interaction methods.

Parameters:
methodName - the method name (only the function symbol)

addInteractionMethod

public void addInteractionMethod(InteractionPoint[] points)
Add a set of interaction point to the current set of interaction points.

Parameters:
points - the interaction points to add

matchAnyFunctionCall

protected <ReturnTypeClass extends CType> boolean matchAnyFunctionCall( fcall)
Test whether or not a given function call corresponds to an interaction point

Type Parameters:
ReturnTypeClass -
Parameters:
fcall - the function call object
Returns:
true if the call corresponds to an interaction point, false if not.

getMatchForFunctionCall

protected <ReturnTypeClass extends CType> InteractionPoint getMatchForFunctionCall( fcall)
Get the interaction point corresponding to a function call

Type Parameters:
ReturnTypeClass -
Parameters:
fcall - the function call
Returns:
an interaction point object if match can be found, null if not.

clearInteractionMethods

public void clearInteractionMethods()
Clears the set of the C function considered as interaction methods.