OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    Message_LazyProgressScope Class Reference

    Progress scope with lazy updates and abort fetches. More...

    #include <Message_LazyProgressScope.hxx>

    Inheritance diagram for Message_LazyProgressScope:

    Public Member Functions

     Message_LazyProgressScope (const Message_ProgressRange &theRange, const char *theName, const double theMax, const double thePatchStep, const bool theIsInf=false)
     Main constructor.
    void Next ()
     Increment progress with 1.
    bool More () const
     Return TRUE if progress has been aborted - return the cached state lazily updated.
    bool IsAborted ()
     Return TRUE if progress has been aborted - fetches actual value from the Progress.

    Protected Attributes

    double myPatchStep
    double myPatchProgress
    bool myIsLazyAborted

    Additional Inherited Members

    Protected Member Functions inherited from Message_ProgressScope
     Message_ProgressScope ()
     Creates a new scope taking responsibility of the part of the progress scale described by theRange. The new scope has own range from 0 to theMax, which is mapped to the given range.
     Message_ProgressScope (const Message_ProgressRange &theRange, const TCollection_AsciiString &theName, double theMax, bool isInfinite=false)
     Creates a new scope taking responsibility of the part of the progress scale described by theRange. The new scope has own range from 0 to theMax, which is mapped to the given range.
    template<size_t N>
     Message_ProgressScope (const Message_ProgressRange &theRange, const char(&theName)[N], double theMax, bool isInfinite=false)
     Creates a new scope taking responsibility of the part of the progress scale described by theRange. The new scope has own range from 0 to theMax, which is mapped to the given range.
     Message_ProgressScope (const Message_ProgressRange &theRange, const NullString *theName, double theMax, bool isInfinite=false)
     Creates a new scope taking responsibility of the part of the progress scale described by theRange. The new scope has own range from 0 to theMax, which is mapped to the given range.
    void SetName (const TCollection_AsciiString &theName)
     Sets the name of the scope.
    template<size_t N>
    void SetName (const char(&theName)[N])
     Sets the name of the scope; can be null. Note! Just pointer to the given string is copied, so do not pass string from a temporary variable whose lifetime is less than that of this object.
    bool UserBreak () const
     Returns false if ProgressIndicator signals UserBreak.
    bool More () const
     Returns false if ProgressIndicator signals UserBreak.
    Message_ProgressRange Next (double theStep=1.)
     Advances position by specified step and returns the range covering this step.
    void Show ()
     Returns true if this progress scope is attached to some indicator.
    bool IsActive () const
     Returns true if this progress scope is attached to some indicator.
    const char * Name () const
     Returns the name of the scope (may be null). Scopes with null name (e.g. root scope) should be bypassed when reporting progress to the user.
    const Message_ProgressScopeParent () const
     Returns parent scope (null for top-level scope).
    double MaxValue () const
     Returns the maximal value of progress in this scope.
    double Value () const
     Returns the current value of progress in this scope.
    bool IsInfinite () const
     Returns the infinite flag.
    double GetPortion () const
     Get the portion of the indicator covered by this scope (from 0 to 1).
     ~Message_ProgressScope ()
     Closes the scope and advances the progress to its end. Closed scope should not be used.
    void Close ()
     Closes the scope and advances the progress to its end. Closed scope should not be used.

    Detailed Description

    Progress scope with lazy updates and abort fetches.

    Although Message_ProgressIndicator implementation is encouraged to spare GUI updates, even optimized implementation might show a noticeable overhead on a very small update step (e.g. per triangle).

    The class splits initial (displayed) number of overall steps into larger chunks specified in constructor, so that displayed progress is updated at larger steps.

    Constructor & Destructor Documentation

    ◆ Message_LazyProgressScope()

    Message_LazyProgressScope::Message_LazyProgressScope ( const Message_ProgressRange & theRange,
    const char * theName,
    const double theMax,
    const double thePatchStep,
    const bool theIsInf = false )
    inline

    Main constructor.

    Parameters
    [in]theRangeprogress range to scope
    [in]theNamename of this scope
    [in]theMaxnumber of steps within this scope
    [in]thePatchStepnumber of steps to update progress
    [in]theIsInfinfinite flag

    Member Function Documentation

    ◆ IsAborted()

    bool Message_LazyProgressScope::IsAborted ( )
    inline

    Return TRUE if progress has been aborted - fetches actual value from the Progress.

    ◆ More()

    bool Message_LazyProgressScope::More ( ) const
    inline

    Return TRUE if progress has been aborted - return the cached state lazily updated.

    ◆ Next()

    void Message_LazyProgressScope::Next ( )
    inline

    Increment progress with 1.

    Field Documentation

    ◆ myIsLazyAborted

    bool Message_LazyProgressScope::myIsLazyAborted
    protected

    ◆ myPatchProgress

    double Message_LazyProgressScope::myPatchProgress
    protected

    ◆ myPatchStep

    double Message_LazyProgressScope::myPatchStep
    protected

    The documentation for this class was generated from the following file: