Package ptolemy.cg.lib.syntactic
Interface SyntacticTerm
-
- All Known Implementing Classes:
SyntacticColumn
,SyntacticContraction
,SyntacticName
,SyntacticNode
,SyntacticSeries
,SyntacticTermList
public interface SyntacticTerm
Represent terms in combinator expressions for Ptolemy models.This interface should be inherited by any objects that will integrate into combinator expressions.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Chris Shaver
- Pt.AcceptedRating:
- red
- Pt.ProposedRating:
- red (shaver)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
generateCode()
Generate code for given term.java.util.List<SyntacticPort>
getInputs()
Return list of input Syntactic Ports to term.int
getOrder()
Get the sort order of term.java.util.List<SyntacticPort>
getOutputs()
Return list of output Syntactic Ports to term.boolean
hasCode()
Decide whether term can generate code representation.java.lang.Integer
inputIndex(SyntacticPort port)
Get index of given port or null.java.lang.Integer
outputIndex(SyntacticPort port)
Get index of given port or null.SyntacticRank
rank()
Get rank of term.int
sizeInputs()
Get number of inputs to term.int
sizeOutputs()
Get number of outputs to term.
-
-
-
Method Detail
-
getInputs
java.util.List<SyntacticPort> getInputs()
Return list of input Syntactic Ports to term.- Returns:
- list of inputs.
-
getOutputs
java.util.List<SyntacticPort> getOutputs()
Return list of output Syntactic Ports to term.- Returns:
- list of outputs.
-
sizeInputs
int sizeInputs()
Get number of inputs to term.- Returns:
- number of inputs.
-
sizeOutputs
int sizeOutputs()
Get number of outputs to term.- Returns:
- number of outputs.
-
rank
SyntacticRank rank()
Get rank of term.- Returns:
- rank of term.
-
inputIndex
java.lang.Integer inputIndex(SyntacticPort port)
Get index of given port or null.- Parameters:
port
- to get the index of.- Returns:
- index of given port or null
-
outputIndex
java.lang.Integer outputIndex(SyntacticPort port)
Get index of given port or null.- Parameters:
port
- to get the index of.- Returns:
- index of given port or null
-
generateCode
java.lang.String generateCode()
Generate code for given term.- Returns:
- generated code string.
-
getOrder
int getOrder()
Get the sort order of term.- Returns:
- sort order of term.
-
hasCode
boolean hasCode()
Decide whether term can generate code representation.- Returns:
- whether term can generate code.
-
-