Class StopCriteriaPtr


  • public class StopCriteriaPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • 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

      • 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.
      • 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
      • 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.
      • stopCnt

        public StopCriteriaPtr stopCnt​(int cnt)
        Stop the computation after cnt calls of the stop criteria.