|
|||||||||
| 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
public class Argument
A native method argument associated with a GenericJNIActor.
GenericJNIActor,
Serialized Form
| Red (vincent.arnould) |
| Red (vincent.arnould) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Nested classes/interfaces inherited from interface ptolemy.kernel.util.Settable |
|---|
Settable.Visibility |
| Field Summary |
|---|
| Fields inherited from class ptolemy.kernel.util.NamedObj |
|---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.kernel.util.Settable |
|---|
EXPERT, FULL, NONE, NOT_EDITABLE |
| Constructor Summary | |
|---|---|
Argument()
Construct an attribute in the default workspace with an empty string as its name. |
|
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(NamedObj container)
Check that the specified container is of a suitable class 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 |
checkType()
Check that the specified type is a suitable type for this entity. |
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()
Get the visibility of this Settable. |
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 visibility)
Set the visibility of this attribute in the user interface. |
java.util.Collection |
validate()
Notify the container that an attribute has changed. |
| Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute |
|---|
getDefaultExpression, getValueAsString |
| Methods inherited from class ptolemy.kernel.util.Attribute |
|---|
_getContainedObject, _propagateExistence, clone, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.kernel.util.Settable |
|---|
getDisplayName |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
|---|
description, getFullName, getName, getName, setName |
| Constructor Detail |
|---|
public Argument()
public Argument(GenericJNIActor container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
container - The container.name - The name of this attribute.
IllegalActionException - If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException - If the name coincides with
an attribute already in the container.| Method Detail |
|---|
public void addValueListener(ValueListener listener)
listener - The listener to add, which is ignored, no
listener is added.removeValueListener(ValueListener)public void checkType()
IllegalActionException - If the Argument has not
an acceptable C type. Not thrown in this base class.
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()
setCType(String)public NamedObj getContainer()
getContainer in interface NameablegetContainer in class AttributesetContainer(NamedObj)public java.lang.String getExpression()
setExpression(String)public java.lang.String getJNIType()
public java.lang.String getJType()
public java.lang.String getKind()
setKind(String)public java.lang.String getType()
public Settable.Visibility getVisibility()
Settable.setVisibility(Visibility)public boolean isInput()
public boolean isOutput()
public boolean isReturn()
public void removeValueListener(ValueListener listener)
listener - The listener to remove.addValueListener(ValueListener)public void setCType(java.lang.String cType)
cType - The C type of argument.getCType()
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.getContainer()public void setExpression(java.lang.String expression)
setExpression in interface SettablesetExpression in class AbstractSettableAttributeexpression - The value of this attribute.getExpression()public void setExpression()
getExpression()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".getKind()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 visibility)
visibility - Ignored, the visibility of this attribute is
always Settable.NONE.getVisibility()
public java.util.Collection validate()
throws IllegalActionException
IllegalActionException - If a error occurs
protected void _checkContainer(NamedObj 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 _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 | ||||||||