iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
imstk::TaskNode Class Reference

Base class for TaskGraph nodes. More...

#include <imstkTaskNode.h>

Public Member Functions

 TaskNode (std::function< void()> func, std::string name="none", bool isCritical=false)
 
 TaskNode (TaskNode &other)
 
void operator= (const TaskNode &other)
 
void setFunction (std::function< void()> func)
 
void setEnabled (bool enabled)
 
bool isFunctional () const
 Returns true if function is nullptr.
 
virtual void execute ()
 Calls the function pointer provided if node enabled.
 
size_t getGlobalId () const
 Get the global (unique) index of the geometry.
 

Static Public Member Functions

static size_t getNumGlobalIds ()
 Get number of ids/taskNodes.
 

Public Attributes

std::string m_name = "none"
 
bool m_enabled = true
 
bool m_isCritical = false
 
double m_computeTime = 0.0
 
bool m_enableTiming = false
 

Static Protected Member Functions

static size_t getUniqueID ()
 

Protected Attributes

std::function< void()> m_func = nullptr
 Don't allow user to call directly (must use execute)
 
size_t m_globalId = static_cast<size_t>(-1)
 Mutex lock for thread-safe counter update.
 

Static Protected Attributes

static std::atomic< size_t > s_numGlobalIds = { 0 }
 

Detailed Description

Base class for TaskGraph nodes.

Definition at line 20 of file imstkTaskNode.h.


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