OpenVDB 7.0.0

Public Member Functions | List of all members
NullInterrupter Struct Reference

Dummy NOOP interrupter class defining interface. More...

`#include <NullInterrupter.h>`

## Public Member Functions
| NullInterrupter ()
| Default constructor. More...
void | start (const char *name=nullptr)
void | end ()
| Signal the end of an interruptible operation. More...
bool | wasInterrupted (int percent=-1)

## Detailed Description

Dummy NOOP interrupter class defining interface.

This shows the required interface for the `InterrupterType` template argument using by several threaded applications (e.g. tools/PointAdvect.h). The host application calls start() at the beginning of an interruptible operation, end() at the end of the operation, and wasInterrupted() periodically during the operation. If any call to wasInterrupted() returns `true`, the operation will be aborted.

Note
  This Dummy interrupter will NEVER interrupt since wasInterrupted() always returns false!

## Constructor & Destructor Documentation

## ◆ NullInterrupter()

NullInterrupter | ( |  | ) |
| inline

Default constructor.

## Member Function Documentation

## ◆ end()

void end | ( |  | ) |
| inline

Signal the end of an interruptible operation.

## ◆ start()

void start | ( | const char * | name = `nullptr` | ) |
| inline

Signal the start of an interruptible operation.

Parameters

  name | an optional descriptive name for the operation

## ◆ wasInterrupted()

bool wasInterrupted | ( | int | percent = `-1` | ) |
| inline

Check if an interruptible operation should be aborted.

Parameters

  percent | an optional (when >= 0) percentage indicating the fraction of the operation that has been completed

Note
  this method is assumed to be thread-safe. The current implementation is clearly a NOOP and should compile out during optimization!

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

- NullInterrupter.h