HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::util::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=NULL)
 
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!

Definition at line 52 of file NullInterrupter.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::util::NullInterrupter::NullInterrupter ( )
inline

Default constructor.

Definition at line 55 of file NullInterrupter.h.

Member Function Documentation

void openvdb::OPENVDB_VERSION_NAME::util::NullInterrupter::end ( void  )
inline

Signal the end of an interruptible operation.

Definition at line 60 of file NullInterrupter.h.

void openvdb::OPENVDB_VERSION_NAME::util::NullInterrupter::start ( const char *  name = NULL)
inline

Signal the start of an interruptible operation.

Parameters
namean optional descriptive name for the operation

Definition at line 58 of file NullInterrupter.h.

bool openvdb::OPENVDB_VERSION_NAME::util::NullInterrupter::wasInterrupted ( int  percent = -1)
inline

Check if an interruptible operation should be aborted.

Parameters
percentan 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!

Definition at line 67 of file NullInterrupter.h.


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