|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.AbstractSettableAttribute
jni.Argument
An Argument is a native function argument associated to a GenericJNIActor
GenericJNIActor,
Serialized Form
| Red (vincent.arnould) |
| Red (vincent.arnould) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Nested classes inherited from class ptolemy.kernel.util.Settable |
Settable.Visibility |
| Field Summary |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.kernel.util.Settable |
EXPERT, FULL, NONE, NOT_EDITABLE |
| Constructor Summary | |
Argument()
Default constructor |
|
Argument(GenericJNIActor container,
java.lang.String name)
Creates a new instance of Argument with the given name for the given GenericJNIActor |
|
| Method Summary | |
protected void |
_checkContainer(GenericJNIActor container)
Check that the specified container is of a suitable class for this entity. |
protected void |
_checkType()
Check that the specified type is a suitable type for this entity. |
protected void |
_propagateValue(NamedObj destination)
Propagate the value of this object to the specified object. |
void |
addValueListener(ValueListener listener)
Add a listener to be notified when the value of this settable object changes. |
void |
exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
Export the Argument in a property MoML. |
java.lang.String |
getC2Type()
Get the C type of the argument as a pointer if it is an array. |
java.lang.String |
getC2TypeHack()
Get the C2 Type Array, but if we are under SunOS, and getC2Type returns long, then return int *. |
NamedObj |
getContainer()
Get the container entity. |
java.lang.String |
getCType()
Get the C type of the argument. |
java.lang.String |
getExpression()
Get the expression of the argument. |
java.lang.String |
getJNIType()
Get the JNI type of the argument. |
java.lang.String |
getJType()
Get the Java type of the argument |
java.lang.String |
getKind()
Get the kind as a comma separated list |
java.lang.String |
getType()
Get the Java class corresponding to the Java Type |
Settable.Visibility |
getVisibility()
This is for derivates of Attribute |
boolean |
isInput()
Return true if it is an input. |
boolean |
isOutput()
Return true if it an output. |
boolean |
isReturn()
Return true if it is a return |
void |
removeValueListener(ValueListener listener)
Remove a listener to be notified when the value of this settable object changes. |
void |
setContainer(NamedObj container)
Specify the container, adding the entity to the list of entities in the container. |
void |
setCType(java.lang.String cType)
Set the C type of the argument with the given string |
void |
setExpression()
Set the expression of the argument from its attributes |
void |
setExpression(java.lang.String expression)
Set the expression of the argument. |
void |
setInput(boolean input)
Set to true if the attribute is an input. |
void |
setKind(java.lang.String selectedValues)
Set the kind of the argument with the given string |
void |
setOutput(boolean output)
Set to true if the attribute is an output. |
void |
setReturn(boolean returnFlag)
Set to true if the attribute is a return |
void |
setVisibility(Settable.Visibility v)
This is for derivates of Attribute set the Visibility |
void |
validate()
Notify the container that an attribute has changed |
| Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute |
getDefaultExpression |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, clone, setName |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getFullName, getName, getName, setName |
| Constructor Detail |
public Argument(GenericJNIActor container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
public Argument()
| Method Detail |
public void addValueListener(ValueListener listener)
listener - The listener to add.
public void exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
throws java.io.IOException
exportMoML in interface MoMLExportableexportMoML in class NamedObjoutput - The output stream to write to.depth - The depth in the hierarchy, to determine indenting.name - The name to use in the exported MoML.
java.io.IOException - If an IO error occursMoMLExportable,
NamedObj.clone(Workspace),
NamedObj.isPersistent(),
NamedObj.getDerivedLevel()public java.lang.String getC2Type()
public java.lang.String getC2TypeHack()
public java.lang.String getCType()
public NamedObj getContainer()
getContainer in interface NameablegetContainer in class Attributepublic java.lang.String getExpression()
public java.lang.String getJNIType()
public java.lang.String getJType()
public java.lang.String getKind()
public java.lang.String getType()
public Settable.Visibility getVisibility()
public boolean isInput()
public boolean isOutput()
public boolean isReturn()
public void removeValueListener(ValueListener listener)
listener - The listener to remove.public void setCType(java.lang.String cType)
public void setContainer(NamedObj container)
throws IllegalActionException,
NameDuplicationException
If the container already contains an entity with the same
name, then throw an exception and do not make any changes.
Similarly, if the container is not in the same workspace as
this entity, throw an exception.
If the entity is already contained by the container,
do nothing.
If this entity already has a container, remove it
from that container first. Otherwise, remove it from
the directory of the workspace, if it is present.
If the argument is null, then unlink the ports of the entity
from any relations and remove it from its container.
It is not added to the workspace directory, so this could
result in this entity being garbage collected.
Derived classes may further constrain the container to
subclasses of CompositeEntity by overriding the protected
method _checkContainer(). This method is write-synchronized to
the workspace and increments its version number.
setContainer in class Attributecontainer - The proposed container, which must be
a GenericJNIActor.
IllegalActionException - If the action would result
in a recursive containment structure, or if this entity and
container are not in the same workspace, or if the container
is not an instance of GenericJNIActor.
NameDuplicationException - If the name of this entity
collides with a name already in the container.public void setExpression(java.lang.String expression)
setExpression in interface SettablesetExpression in class AbstractSettableAttributeexpression - The value of the attribute.AbstractSettableAttribute.getDefaultExpression()public void setExpression()
public void setInput(boolean input)
input - True if this is an input, false if it is not.public void setKind(java.lang.String selectedValues)
selectedValues - A string describing the type of Argument.
valid values are "input", "output", "return", "input, output".public void setOutput(boolean output)
output - True if this is an output, false if it is not.public void setReturn(boolean returnFlag)
returnFlag - True if this is an input, false if it is not.public void setVisibility(Settable.Visibility v)
v - The visibility of this Settable.
public void validate()
throws IllegalActionException
IllegalActionException - If a error occurs
protected void _checkContainer(GenericJNIActor container)
throws IllegalActionException
container - The proposed container.
IllegalActionException - If the container is not of
an acceptable class. Not thrown in this base class.protected void _checkType()
IllegalActionException - If the Argument has not
an acceptable C type. Not thrown in this base class.
protected void _propagateValue(NamedObj destination)
throws IllegalActionException
_propagateValue in class NamedObjdestination - Object to which to propagate the
value.
IllegalActionException - If the value cannot
be propagated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||