Package org.robwork.sdurwsim
Class ThreadSimulatorPtr
- java.lang.Object
-
- org.robwork.sdurwsim.ThreadSimulatorPtr
-
public class ThreadSimulatorPtr extends java.lang.Object
Ptr 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.void
delete()
ThreadSimulator
deref()
The pointer stored in the object.boolean
equals(ThreadSimulator p)
static long
getCPtr(ThreadSimulatorPtr obj)
ThreadSimulator
getDeref()
Member access operator.DynamicSimulatorPtr
getSimulator()
State
getState()
double
getTime()
boolean
isInError()
boolean
isNull()
checks if the pointer is nullboolean
isRunning()
boolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
postStop()
void
reset(State state)
void
setInError(boolean inError)
void
setRealTimeScale(double scale)
void
setState(State state)
void
setStepCallBack(ThreadSimulatorStepCallback cb)
void
setStepCallBack(ThreadSimulatorStepCallbackEnv cb)
void
setTimeStep(double dt)
void
start()
void
step()
void
stop()
-
-
-
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)
-
-