Pointwise Plugin SDK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Progress Handling
+ Collaboration diagram for Progress Handling:

Functions

PWP_BOOL grdpProgressBeginStep (GRDP_RTITEM *pRti, PWP_UINT32 total)
 Begins a progress tracking step. More...
 
PWP_BOOL grdpProgressEnd (GRDP_RTITEM *pRti, const PWP_BOOL ok)
 Ends all progress tracking. More...
 
PWP_BOOL grdpProgressEndStep (GRDP_RTITEM *pRti)
 Completes a progress tracking major step. More...
 
PWP_BOOL grdpProgressIncr (GRDP_RTITEM *pRti)
 Completes a progress tracking sub-step. More...
 
PWP_BOOL grdpProgressInit (GRDP_RTITEM *pRti, PWP_UINT32 cnt)
 Initializes a progress tracking session. More...
 

Detailed Description

Bundle and send a progress message back to framework. These are wrappers for the lower level PwuProgressXxxx() functions.

See Also
PwuProgressBegin(), PwuProgressEnd(), PwuProgressStatus(), PwuProgressNextStep(), PwuProgressQuit()

Function Documentation

PWP_BOOL grdpProgressBeginStep ( GRDP_RTITEM pRti,
PWP_UINT32  total 
)

Begins a progress tracking step.

Called by a plugin before begining a major import step.

Parameters
pRtiThe GRDP_RTITEM pointer passed into runtimeWrite().
totalThe number of sub-steps in this major step.
Note
See example usage in grdpProgressInit().

Definition at line 65 of file apiGRDPUtils.cxx.

References GRDP_CLKS_BEGSTEP, and PWP_FALSE.

PWP_BOOL grdpProgressEnd ( GRDP_RTITEM pRti,
const PWP_BOOL  ok 
)

Ends all progress tracking.

Called by a plugin after all major steps are completed or when exiting early for an import error.

Parameters
pRtiThe GRDP_RTITEM pointer passed into runtimeWrite().
okSet to PWP_TRUE/PWP_FALSE to indicate sucess/failure.
Note
See example usage in grdpProgressInit().

Definition at line 154 of file apiGRDPUtils.cxx.

References PWU_RTITEM::apiInfo, GRDP_CLKS_PROGEND, GRDP_CLKS_PROGINIT, GRDP_CLKS_PROGUPDATE, PWP_APIINFO::name, GRDP_RTITEM::pApiData, PwuProgressEnd(), and sendClkDiffTimeMsg().

PWP_BOOL grdpProgressEndStep ( GRDP_RTITEM pRti)

Completes a progress tracking major step.

Called by a plugin after each import major step is completed.

Parameters
pRtiThe GRDP_RTITEM pointer passed into runtimeWrite().
Note
See example usage in grdpProgressInit().

Definition at line 137 of file apiGRDPUtils.cxx.

References PWU_RTITEM::apiInfo, GRDP_CLKS_BEGSTEP, GRDP_CLKS_ENDSTEP, PWP_APIINFO::name, GRDP_RTITEM::pApiData, PWP_FALSE, PwuProgressNextStep(), and sendClkDiffTimeMsg().

PWP_BOOL grdpProgressIncr ( GRDP_RTITEM pRti)

Completes a progress tracking sub-step.

Called by a plugin after each import sub-step is completed.

Parameters
pRtiThe GRDP_RTITEM pointer passed into runtimeWrite().
Note
See example usage in grdpProgressInit().

Definition at line 79 of file apiGRDPUtils.cxx.

References PWU_RTITEM::apiInfo, GRDP_CLKS_PROGINCR, GRDP_CLKS_PROGUPDATE, GRDP_RT_CLKS_DIFF, PWP_APIINFO::name, GRDP_RTITEM::pApiData, PWP_FALSE, PWP_TRUE, and PwuProgressStatus().

PWP_BOOL grdpProgressInit ( GRDP_RTITEM pRti,
PWP_UINT32  cnt 
)

Initializes a progress tracking session.

Called once by a plugin before an import begins.

Parameters
pRtiThe GRDP_RTITEM pointer passed into runtimeWrite().
cntThe number of major steps to be used for this import session.
Sample usage:
// Set a total of 3 MAJOR progress steps.
if (grdpProgressInit(pRti, 3)) {
// begin MAJOR step 1 composed of 44 sub-steps
if (ok = grdpProgressBeginStep(pRti, 44)) {
int ii;
for (ii=0; ii < 44 && ok; ++ii) {
// repeat for the 44 sub-steps
ok = grdpProgressIncr(pRti);
}
// This call is optional. It is valid to call
// grdpProgressBeginStep() or grdpProgressEnd() instead.
if (ok) {
ok = grdpProgressEndStep(pRti);
}
}
// begin MAJOR step 2 composed of 22 sub-steps
if (ok && ok = grdpProgressBeginStep(pRti, 22)) {
...snip...
}
// begin MAJOR step 3 composed of 10 sub-steps
if (ok && ok = grdpProgressBeginStep(pRti, 10)) {
...snip...
}
grdpProgressEnd(pRti, ok);
}

Definition at line 48 of file apiGRDPUtils.cxx.

References PWU_RTITEM::apiInfo, GRDP_CLKS_PROGINIT, GRDP_CLKS_PROGUPDATE, PWP_APIINFO::name, GRDP_RTITEM::pApiData, PWP_FALSE, and PwuProgressBegin().