Package org.lemsml.jruntime
Class NativeWrapper
- java.lang.Object
-
- org.lemsml.jruntime.NativeWrapper
-
- All Implemented Interfaces:
StateRunnable
public class NativeWrapper extends java.lang.Object implements StateRunnable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) NativeType
nativeType
(package private) GeneratedInstance
target
-
Constructor Summary
Constructors Constructor Description NativeWrapper(GeneratedInstance geninst, NativeType nt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttachment(java.lang.String destAttachments, StateInstance rsi)
void
addAttachment(StateInstance rsi)
void
advance(StateRunnable parent, double t, double dt)
void
checkBuilt()
void
evaluate(StateRunnable parent)
void
exportState(java.lang.String pfx, double t, LineDisplay ld)
StateRunnable
getChild(java.lang.String snm)
StateRunnable
getChildInstance(java.lang.String string)
java.lang.String
getChildSummary()
java.lang.Object
getComponentID()
java.lang.String
getDimensionString(java.lang.String lastbit)
InPort
getFirstInPort()
OutPort
getFirstOutPort()
double
getFloatProperty(java.lang.String sel)
java.lang.String
getID()
InPort
getInPort(java.lang.String portId)
InstanceSet<StateRunnable>
getInstanceSet(java.lang.String col)
OutPort
getOutPort(java.lang.String sourcePortId)
StateRunnable
getParent()
java.util.ArrayList<StateRunnable>
getPathInstances(java.lang.String sel)
StateRunnable
getPathStateInstance(java.lang.String path)
java.lang.String
getPathStringValue(java.lang.String fieldName, double fac, double off)
StateRunnable
getScopeInstance(java.lang.String id)
MultiInstance
getSingleMI()
java.util.ArrayList<StateRunnable>
getStateInstances()
java.util.ArrayList<StateRunnable>
getStateInstances(java.lang.String path)
InstanceSet<StateRunnable>
getUniqueInstanceSet()
double
getVariable(java.lang.String varname)
java.util.HashMap<java.lang.String,DoublePointer>
getVariables()
java.lang.Object
getWork()
StateWrapper
getWrapper(java.lang.String string)
boolean
hasChildInstance(java.lang.String string)
boolean
hasSingleMI()
void
initialize(StateRunnable sr)
boolean
isBuilt()
double
quietGetFloatProperty(java.lang.String sel)
java.util.ArrayList<StateRunnable>
quietGetStateInstances(java.lang.String path)
void
setList(java.lang.String childrenName)
void
setNewVariable(java.lang.String string, double d)
void
setParent(StateRunnable par)
void
setVariable(java.lang.String varname, double d)
java.lang.String
stateString()
-
-
-
Field Detail
-
target
GeneratedInstance target
-
nativeType
NativeType nativeType
-
-
Constructor Detail
-
NativeWrapper
public NativeWrapper(GeneratedInstance geninst, NativeType nt)
-
-
Method Detail
-
advance
public void advance(StateRunnable parent, double t, double dt) throws RuntimeError, ContentError
- Specified by:
advance
in interfaceStateRunnable
- Throws:
RuntimeError
ContentError
-
getVariable
public double getVariable(java.lang.String varname) throws RuntimeError
- Specified by:
getVariable
in interfaceStateRunnable
- Throws:
RuntimeError
-
getChild
public StateRunnable getChild(java.lang.String snm) throws ConnectionError
- Specified by:
getChild
in interfaceStateRunnable
- Throws:
ConnectionError
-
exportState
public void exportState(java.lang.String pfx, double t, LineDisplay ld)
- Specified by:
exportState
in interfaceStateRunnable
-
getFirstInPort
public InPort getFirstInPort() throws ConnectionError
- Specified by:
getFirstInPort
in interfaceStateRunnable
- Throws:
ConnectionError
-
getInPort
public InPort getInPort(java.lang.String portId) throws ConnectionError
- Specified by:
getInPort
in interfaceStateRunnable
- Throws:
ConnectionError
-
getWrapper
public StateWrapper getWrapper(java.lang.String string)
- Specified by:
getWrapper
in interfaceStateRunnable
-
getVariables
public java.util.HashMap<java.lang.String,DoublePointer> getVariables()
- Specified by:
getVariables
in interfaceStateRunnable
-
stateString
public java.lang.String stateString()
- Specified by:
stateString
in interfaceStateRunnable
-
setVariable
public void setVariable(java.lang.String varname, double d)
- Specified by:
setVariable
in interfaceStateRunnable
-
getID
public java.lang.String getID()
- Specified by:
getID
in interfaceStateRunnable
-
setNewVariable
public void setNewVariable(java.lang.String string, double d)
- Specified by:
setNewVariable
in interfaceStateRunnable
-
evaluate
public void evaluate(StateRunnable parent) throws RuntimeError, ContentError
- Specified by:
evaluate
in interfaceStateRunnable
- Throws:
RuntimeError
ContentError
-
initialize
public void initialize(StateRunnable sr) throws RuntimeError, ContentError
- Specified by:
initialize
in interfaceStateRunnable
- Throws:
RuntimeError
ContentError
-
getComponentID
public java.lang.Object getComponentID()
- Specified by:
getComponentID
in interfaceStateRunnable
-
hasChildInstance
public boolean hasChildInstance(java.lang.String string)
- Specified by:
hasChildInstance
in interfaceStateRunnable
-
getChildInstance
public StateRunnable getChildInstance(java.lang.String string) throws ContentError
- Specified by:
getChildInstance
in interfaceStateRunnable
- Throws:
ContentError
-
quietGetStateInstances
public java.util.ArrayList<StateRunnable> quietGetStateInstances(java.lang.String path) throws ConnectionError, ContentError, RuntimeError
- Specified by:
quietGetStateInstances
in interfaceStateRunnable
- Throws:
ConnectionError
ContentError
RuntimeError
-
setParent
public void setParent(StateRunnable par)
- Specified by:
setParent
in interfaceStateRunnable
-
getStateInstances
public java.util.ArrayList<StateRunnable> getStateInstances() throws ConnectionError, ContentError, RuntimeError
- Specified by:
getStateInstances
in interfaceStateRunnable
- Throws:
ConnectionError
ContentError
RuntimeError
-
checkBuilt
public void checkBuilt() throws ConnectionError, ContentError, RuntimeError
- Specified by:
checkBuilt
in interfaceStateRunnable
- Throws:
ConnectionError
ContentError
RuntimeError
-
getScopeInstance
public StateRunnable getScopeInstance(java.lang.String id)
- Specified by:
getScopeInstance
in interfaceStateRunnable
-
getPathInstances
public java.util.ArrayList<StateRunnable> getPathInstances(java.lang.String sel) throws ContentError, ConnectionError, RuntimeError
- Specified by:
getPathInstances
in interfaceStateRunnable
- Throws:
ContentError
ConnectionError
RuntimeError
-
quietGetFloatProperty
public double quietGetFloatProperty(java.lang.String sel) throws ContentError
- Specified by:
quietGetFloatProperty
in interfaceStateRunnable
- Throws:
ContentError
-
hasSingleMI
public boolean hasSingleMI()
- Specified by:
hasSingleMI
in interfaceStateRunnable
-
getOutPort
public OutPort getOutPort(java.lang.String sourcePortId)
- Specified by:
getOutPort
in interfaceStateRunnable
-
getPathStateInstance
public StateRunnable getPathStateInstance(java.lang.String path) throws ContentError
- Specified by:
getPathStateInstance
in interfaceStateRunnable
- Throws:
ContentError
-
getFirstOutPort
public OutPort getFirstOutPort()
- Specified by:
getFirstOutPort
in interfaceStateRunnable
-
getParent
public StateRunnable getParent()
- Specified by:
getParent
in interfaceStateRunnable
-
getUniqueInstanceSet
public InstanceSet<StateRunnable> getUniqueInstanceSet() throws ContentError
- Specified by:
getUniqueInstanceSet
in interfaceStateRunnable
- Throws:
ContentError
-
getInstanceSet
public InstanceSet<StateRunnable> getInstanceSet(java.lang.String col)
- Specified by:
getInstanceSet
in interfaceStateRunnable
-
getWork
public java.lang.Object getWork()
- Specified by:
getWork
in interfaceStateRunnable
-
getStateInstances
public java.util.ArrayList<StateRunnable> getStateInstances(java.lang.String path) throws ConnectionError, ContentError, RuntimeError
- Specified by:
getStateInstances
in interfaceStateRunnable
- Throws:
ConnectionError
ContentError
RuntimeError
-
getFloatProperty
public double getFloatProperty(java.lang.String sel) throws ContentError
- Specified by:
getFloatProperty
in interfaceStateRunnable
- Throws:
ContentError
-
getPathStringValue
public java.lang.String getPathStringValue(java.lang.String fieldName, double fac, double off) throws ContentError, RuntimeError
- Specified by:
getPathStringValue
in interfaceStateRunnable
- Throws:
ContentError
RuntimeError
-
addAttachment
public void addAttachment(java.lang.String destAttachments, StateInstance rsi) throws ConnectionError, ContentError, RuntimeError
- Specified by:
addAttachment
in interfaceStateRunnable
- Throws:
ConnectionError
ContentError
RuntimeError
-
getSingleMI
public MultiInstance getSingleMI()
- Specified by:
getSingleMI
in interfaceStateRunnable
-
setList
public void setList(java.lang.String childrenName)
- Specified by:
setList
in interfaceStateRunnable
-
getChildSummary
public java.lang.String getChildSummary()
- Specified by:
getChildSummary
in interfaceStateRunnable
-
isBuilt
public boolean isBuilt()
- Specified by:
isBuilt
in interfaceStateRunnable
-
addAttachment
public void addAttachment(StateInstance rsi) throws ConnectionError, ContentError, RuntimeError
- Specified by:
addAttachment
in interfaceStateRunnable
- Throws:
ConnectionError
ContentError
RuntimeError
-
getDimensionString
public java.lang.String getDimensionString(java.lang.String lastbit)
- Specified by:
getDimensionString
in interfaceStateRunnable
-
-