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
    MoniTool_Stat Class Reference

    This class manages Statistics to be queried asynchronously. More...

    #include <MoniTool_Stat.hxx>

    Public Member Functions

     MoniTool_Stat (const char *const title="")
     Creates a Stat form. At start, one default phase is defined, with one default step. Then, it suffises to start with a count of items (and cycles if several) then record items, to have a queryable report.
     MoniTool_Stat (const MoniTool_Stat &other)
     used when starting
    int Open (const int nb=100)
     Opens a new counter with a starting count of items.
    void OpenMore (const int idid, const int nb)
     Adds more items to be counted by Add... on current level.
    void Add (const int nb=1)
     Directly adds items.
    void AddSub (const int nb=1)
     Declares a count of items to be added later. If a sub-counter is opened, its percentage multiplies this sub-count to compute the percent of current level.
    void AddEnd ()
     Ends the AddSub and cumulates the sub-count to current level.
    void Close (const int idid)
    int Level () const
    double Percent (const int fromlev=0) const

    Static Public Member Functions

    static MoniTool_StatCurrent ()

    Detailed Description

    This class manages Statistics to be queried asynchronously.

    It is organized as a stack of counters, identified by their levels, from one to ... . Each one has a total account of items to be counted, a count of already passed items, plus a count of "current items". The counters of higher level play on these current items. For instance, if a counter has been opened for 100 items, 40 already passed, 20 current, its own percent is 40, but there is the contribution of higher level counters, rated for 20 % of this counter.

    Hence, a counter is opened, items are added. Also items can be add for sub-counter (of higher level), they will be added definitively when the sub-counter will be closed. When the count has ended, this counter is closed, the counter of lower level cumulates it and goes on. As follows :

    Way of use : Open(nbitems); Add(..) : direct adding Add(..) AddSub (nsub) : for sub-counter Open (nbsubs) : nbsubs for this sub-counter Add (..) Close : the sub-counter AddEnd() etc... Close : the starting counter

    This means that a counter can be opened in a Stat, regardless to the already opened ones :: this will be cumulated

    A Current Stat is available, but it is possible to have others

    Constructor & Destructor Documentation

    ◆ MoniTool_Stat() [1/2]

    MoniTool_Stat::MoniTool_Stat ( const char *const title = "")

    Creates a Stat form. At start, one default phase is defined, with one default step. Then, it suffises to start with a count of items (and cycles if several) then record items, to have a queryable report.

    ◆ MoniTool_Stat() [2/2]

    MoniTool_Stat::MoniTool_Stat ( const MoniTool_Stat & other)

    used when starting

    Member Function Documentation

    ◆ Add()

    void MoniTool_Stat::Add ( const int nb = 1)

    Directly adds items.

    ◆ AddEnd()

    void MoniTool_Stat::AddEnd ( )

    Ends the AddSub and cumulates the sub-count to current level.

    ◆ AddSub()

    void MoniTool_Stat::AddSub ( const int nb = 1)

    Declares a count of items to be added later. If a sub-counter is opened, its percentage multiplies this sub-count to compute the percent of current level.

    ◆ Close()

    void MoniTool_Stat::Close ( const int id)

    ◆ Current()

    MoniTool_Stat & MoniTool_Stat::Current ( )
    static

    ◆ Level()

    int MoniTool_Stat::Level ( ) const

    ◆ Open()

    int MoniTool_Stat::Open ( const int nb = 100)

    Opens a new counter with a starting count of items.

    ◆ OpenMore()

    void MoniTool_Stat::OpenMore ( const int id,
    const int nb )

    Adds more items to be counted by Add... on current level.

    ◆ Percent()

    double MoniTool_Stat::Percent ( const int fromlev = 0) const

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