Package org.robwork.sdurw_pathplanning
Class StopCriteriaPtr
- java.lang.Object
-
- org.robwork.sdurw_pathplanning.StopCriteriaPtr
-
public class StopCriteriaPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description StopCriteriaPtr()
Default constructor yielding a NULL-pointer.StopCriteriaPtr(long cPtr, boolean cMemoryOwn)
StopCriteriaPtr(StopCriteria 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 StopCriteria
__ref__()
Dereferencing operator.StopCriteriaCPtr
cptr()
void
delete()
StopCriteria
deref()
The pointer stored in the object.boolean
equals(StopCriteria p)
static long
getCPtr(StopCriteriaPtr obj)
StopCriteria
getDeref()
Member access operator.StopCriteriaPtr
instance()
A new instance of the property constructed to match the
original initial state of the criteria.
This implies, for example, that instance() called for a time criteria
creates a new criteria that stops after the same amount of time that
was specified for the original stop criteria.
Not all stop criteria returned are required to behave this way.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipboolean
stop()
True is returned when the computation should be stopped.StopCriteriaPtr
stopAfter(double time)
Stop the computation after time seconds from now.
RobWork does not link with a thread library, and therefore this
function is implemented by polling a timer.StopCriteriaPtr
stopByFlag(SWIGTYPE_p_bool stop)
Stop the computation when stop says so.
stop must be non-null.
Ownership of stop is not taken.StopCriteriaPtr
stopByFun(SWIGTYPE_p_boost__functionT_bool_fF_t fun)
Stop the computation when fun says so.StopCriteriaPtr
stopCnt(int cnt)
Stop the computation after cnt calls of the stop criteria.StopCriteriaPtr
stopEither(StopCriteriaPtr a, StopCriteriaPtr b)
Stop if either a or b says stop.StopCriteriaPtr
stopEither(VectorStopCriteriaPtr criteria)
Stop if either of criteria says stop.StopCriteriaPtr
stopNever()
Never stop the computation.StopCriteriaPtr
stopNow()
Immediately stop the computation.
-
-
-
Constructor Detail
-
StopCriteriaPtr
public StopCriteriaPtr(long cPtr, boolean cMemoryOwn)
-
StopCriteriaPtr
public StopCriteriaPtr()
Default constructor yielding a NULL-pointer.
-
StopCriteriaPtr
public StopCriteriaPtr(StopCriteria ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(StopCriteriaPtr obj)
-
delete
public void delete()
-
deref
public StopCriteria deref()
The pointer stored in the object.
-
__ref__
public StopCriteria __ref__()
Dereferencing operator.
-
getDeref
public StopCriteria getDeref()
Member access operator.
-
equals
public boolean equals(StopCriteria 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
-
cptr
public StopCriteriaCPtr cptr()
-
stop
public boolean stop()
True is returned when the computation should be stopped.
-
instance
public StopCriteriaPtr instance()
A new instance of the property constructed to match the
original initial state of the criteria.
This implies, for example, that instance() called for a time criteria
creates a new criteria that stops after the same amount of time that
was specified for the original stop criteria.
Not all stop criteria returned are required to behave this way. For
some types of stop criteria, the instances of the stop criteria will
be effectively identical to the stop criteria itself.
-
stopAfter
public StopCriteriaPtr stopAfter(double time)
Stop the computation after time seconds from now.
RobWork does not link with a thread library, and therefore this
function is implemented by polling a timer. This makes the function
relatively slow for its purpose.
-
stopNever
public StopCriteriaPtr stopNever()
Never stop the computation.
-
stopNow
public StopCriteriaPtr stopNow()
Immediately stop the computation.
-
stopByFlag
public StopCriteriaPtr stopByFlag(SWIGTYPE_p_bool stop)
Stop the computation when stop says so.
stop must be non-null.
Ownership of stop is not taken.
-
stopByFun
public StopCriteriaPtr stopByFun(SWIGTYPE_p_boost__functionT_bool_fF_t fun)
Stop the computation when fun says so.
-
stopCnt
public StopCriteriaPtr stopCnt(int cnt)
Stop the computation after cnt calls of the stop criteria.
-
stopEither
public StopCriteriaPtr stopEither(VectorStopCriteriaPtr criteria)
Stop if either of criteria says stop.
-
stopEither
public StopCriteriaPtr stopEither(StopCriteriaPtr a, StopCriteriaPtr b)
Stop if either a or b says stop.
-
-