|
INRIA & FluxMedia | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
fr.fluxmedia.transmorpher.graph.TransformationImpl
public abstract class TransformationImpl
This class is an helper class that implements most of the Transformation interface methods
Field Summary | |
---|---|
protected StringParameters |
attributes
The storage object for the attributes of this Transformation instance |
protected PortList |
inPorts
The list of in ports |
protected java.lang.String |
name
The name of the transformation instance |
protected PortList |
outPorts
The list of out ports |
protected Parameters |
parameters
The storage object for the parameters of this Transformation instance |
protected Transmorpher |
transmorpher
The Transmorpher instance that owns this Transformation |
protected java.lang.String |
type
The type of this Transformation instance |
Constructor Summary | |
---|---|
TransformationImpl(java.lang.String name,
java.lang.String type,
Transmorpher transmorpher)
Creates an instance of Transformation with a name, a type and the owner of this instance |
|
TransformationImpl(java.lang.String name,
java.lang.String type,
Transmorpher transmorpher,
int nbIn,
int nbOut)
Creates an instance of Transformation with a name, a type and the owner of this instance |
Method Summary | |
---|---|
void |
addIn(int index,
Port port)
Adds a new in port at the given index in the storage list |
void |
addIn(Port port)
Adds a new in port at the end of the storage list |
void |
addOut(int i,
Port p)
Adds a new out port at the given index in the storage list |
void |
addOut(Port port)
Adds a new out port at the end of the storage list |
abstract void |
generateJavaCode(Writer file,
LinearIndexedStruct externs)
Prints the Java code for the execution of Transformation instance |
abstract void |
generateXML()
Prints the XML expression of the Transformation instance |
StringParameters |
getAttributes()
Gets the attributes attribute of the TransformationImpl object |
java.lang.String |
getName()
Gets the name attribute of the TransformationImpl object |
Parameters |
getParameters()
Gets the parameters attribute of the TransformationImpl object |
Transmorpher |
getTransmorpher()
Gets the transmorpher attribute of the TransformationImpl object |
java.lang.String |
getType()
Gets the type attribute of the TransformationImpl object |
PortList |
inPorts()
Gets the list of in ports |
PortList |
outPorts()
Gets the list of out ports |
void |
retroNull(PortList out,
PortList in)
This is the trivial case if all the output is null then all the input are null * |
void |
setName(java.lang.String newName)
When the process name change, we must change the key in transmorpher storage structure. |
void |
setParameters(Parameters p)
Sets the parameters attribute of the TransformationImpl object |
void |
setType(java.lang.String t)
Sets the type attribute of the TransformationImpl object |
void |
update(java.lang.Object object)
This method is used by FlowComposer ( a GUI tool for Transmorpher) |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected PortList inPorts
protected PortList outPorts
protected Parameters parameters
protected StringParameters attributes
protected Transmorpher transmorpher
protected java.lang.String type
Constructor Detail |
---|
public TransformationImpl(java.lang.String name, java.lang.String type, Transmorpher transmorpher)
name
- The name of the instance to createtype
- The type of the instance to createtransmorpher
- The owner of the instance to createpublic TransformationImpl(java.lang.String name, java.lang.String type, Transmorpher transmorpher, int nbIn, int nbOut)
name
- The name of the instance to createtype
- The type of the instance to createtransmorpher
- The owner of the instance to createnbIn
- The number of in portsnbOut
- The number of out portsMethod Detail |
---|
public java.lang.String getName()
getName
in interface Transformation
public void setName(java.lang.String newName)
setName
in interface Transformation
newName
- The new name valuepublic Transmorpher getTransmorpher()
getTransmorpher
in interface Transformation
public java.lang.String getType()
getType
in interface Transformation
public void setType(java.lang.String t)
setType
in interface Transformation
t
- The new type valuepublic void setParameters(Parameters p)
setParameters
in interface Transformation
p
- The new parameters valuepublic Parameters getParameters()
getParameters
in interface Transformation
public StringParameters getAttributes()
getAttributes
in interface Transformation
public void addIn(Port port)
port
- The in port to addpublic void addIn(int index, Port port)
index
- The indexport
- The port to addpublic PortList inPorts()
inPorts
in interface Transformation
public void addOut(Port port)
port
- The port to addpublic void addOut(int i, Port p)
index
- The indexport
- The port to addpublic PortList outPorts()
outPorts
in interface Transformation
public abstract void generateXML()
generateXML
in interface Transformation
public abstract void generateJavaCode(Writer file, LinearIndexedStruct externs) throws java.io.IOException
generateJavaCode
in interface Transformation
file
- The writer used for printing java code in a fileexterns
- The list of external components
java.io.IOException
- When IO errors occurpublic void retroNull(PortList out, PortList in)
retroNull
in interface Transformation
out
- Description of the Parameterin
- Description of the Parameterpublic void update(java.lang.Object object)
update
in interface Transformation
object
- Description of the Parameter
|
INRIA & FluxMedia | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |