Package org.robwork.sdurwsim
Class ThreadSimulatorPtr
- java.lang.Object
-
- org.robwork.sdurwsim.ThreadSimulatorPtr
-
public class ThreadSimulatorPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description ThreadSimulatorPtr()Default constructor yielding a NULL-pointer.ThreadSimulatorPtr(long cPtr, boolean cMemoryOwn)ThreadSimulatorPtr(ThreadSimulator ptr)Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadSimulator__ref__()Dereferencing operator.voiddelete()ThreadSimulatorderef()The pointer stored in the object.booleanequals(ThreadSimulator p)static longgetCPtr(ThreadSimulatorPtr obj)ThreadSimulatorgetDeref()Member access operator.DynamicSimulatorPtrgetSimulator()StategetState()doublegetTime()booleanisInError()booleanisNull()checks if the pointer is nullbooleanisRunning()booleanisShared()check if this Ptr has shared ownership or none
ownershipvoidpostStop()voidreset(State state)voidsetInError(boolean inError)voidsetRealTimeScale(double scale)voidsetState(State state)voidsetStepCallBack(ThreadSimulatorStepCallback cb)voidsetStepCallBack(ThreadSimulatorStepCallbackEnv cb)voidsetTimeStep(double dt)voidstart()voidstep()voidstop()
-
-
-
Constructor Detail
-
ThreadSimulatorPtr
public ThreadSimulatorPtr(long cPtr, boolean cMemoryOwn)
-
ThreadSimulatorPtr
public ThreadSimulatorPtr()
Default constructor yielding a NULL-pointer.
-
ThreadSimulatorPtr
public ThreadSimulatorPtr(ThreadSimulator ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ThreadSimulatorPtr obj)
-
delete
public void delete()
-
deref
public ThreadSimulator deref()
The pointer stored in the object.
-
__ref__
public ThreadSimulator __ref__()
Dereferencing operator.
-
getDeref
public ThreadSimulator getDeref()
Member access operator.
-
equals
public boolean equals(ThreadSimulator p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
setRealTimeScale
public void setRealTimeScale(double scale)
-
setTimeStep
public void setTimeStep(double dt)
-
start
public void start()
-
stop
public void stop()
-
postStop
public void postStop()
-
step
public void step()
-
getState
public State getState()
-
setState
public void setState(State state)
-
reset
public void reset(State state)
-
isRunning
public boolean isRunning()
-
getTime
public double getTime()
-
getSimulator
public DynamicSimulatorPtr getSimulator()
-
setStepCallBack
public void setStepCallBack(ThreadSimulatorStepCallbackEnv cb)
-
setStepCallBack
public void setStepCallBack(ThreadSimulatorStepCallback cb)
-
isInError
public boolean isInError()
-
setInError
public void setInError(boolean inError)
-
-