|
Rhino C++ API
8.24
|
#include <rhinoSdkGet.h>
Classes | |
| class | Task |
Public Member Functions | |
| CRhinoGetCancel () | |
| CRhinoGetCancel (const CRhinoGetCancel &)=delete | |
| virtual | ~CRhinoGetCancel () |
| void | DoNotWaitForTasksToFinishWhenCancelled (void) |
| int | MaxConcurrentTasks () const |
| CRhinoGetCancel & | operator= (const CRhinoGetCancel &)=delete |
| bool | Run (const wchar_t *prompt, const std::vector< std::shared_ptr< Task >> &tasks, const CRhinoDoc *pDoc) const |
| void | SetAllowCancelWhileAnotherApplicationHasFocus (bool b) |
| void | SetMaxConcurrentTasks (int) |
Description: Used to perform background calculations on different threads while waiting for completion or the user to press escape to cancel.
| CRhinoGetCancel::CRhinoGetCancel | ( | ) |
|
delete |
|
virtual |
| void CRhinoGetCancel::DoNotWaitForTasksToFinishWhenCancelled | ( | void | ) |
Description: When escape is pressed the ON_Terminator passed to all tasks is set to to a state where termination has been requested. The Run function will wait until all of the tasks have finished unless this function is called.
| int CRhinoGetCancel::MaxConcurrentTasks | ( | ) | const |
Description: Max number of concurrent tasks to run. By default, this is the number of processors - 2.
|
delete |
| bool CRhinoGetCancel::Run | ( | const wchar_t * | prompt, |
| const std::vector< std::shared_ptr< Task >> & | tasks, | ||
| const CRhinoDoc * | pDoc | ||
| ) | const |
Description: Runs a number of asynchronous tasks and waits for either all of the tasks to complete or for the user to cancel by pressing escape Parameters: prompt - [in] prompt to display at the command prompt tasks - [in] the tasks to run doc - [in] document this run is associated with Returns: true if all tasks ran to completion false if the tasks were cancelled
| void CRhinoGetCancel::SetAllowCancelWhileAnotherApplicationHasFocus | ( | bool | b | ) |
Description: Sets whether escape cancels the task while another application has focus.
| void CRhinoGetCancel::SetMaxConcurrentTasks | ( | int | ) |
Description: Set the max number of concurrent tasks to run.
1.8.17