LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::Thread Class Reference

#include <threads.h>

+ Inheritance diagram for lwpp::Thread:
+ Collaboration diagram for lwpp::Thread:

List of all members.

Public Member Functions

virtual bool available () const
 Check if the global is available.
virtual LWMTUtilFuncs * getGlobal ()
 Get the pointer to the global.
LWMTUtilFuncs * operator-> ()
 Get the pointer to the global.

Static Public Member Functions

static int LWMTThreadFunc (void *arg)

Protected Member Functions

bool _acquireGlobal ()
bool checkAbort (void)
 This function allows the current or identified thread to check for an abort signal from the main group.
void * getData ()
 Gets the private data storage for the currently running thread.
LWMTGroupID getGroupID ()
 Allows the thread to retrieve the identifier for the group to which it belongs.
LWMTThreadID getID ()
 Returns the identifier of the currently running thread.
int getIndex ()
 Returns the group index value of the current thread.
virtual int Run ()=0
 The actual function to run, to be overriden by the derived class.
void setData (void *ptr)
 Sets the private data storage for the currently running thread.
void sleep (int delay)
 Causes the thread to "sleep" for a specified number of milliseconds.

Static Protected Attributes

static LWMTUtilFuncs * globPtr
 Pointer to the global functions.

Detailed Description

Base class for threads running within LightWave 3D

To use derive your class from it and implement run(). Add the Thread using ThreadGroup.

See also:
ThreadGroup

Member Function Documentation

bool lwpp::GlobalBase< LWMTUtilFuncs >::_acquireGlobal ( )
inlineprotectedinherited
virtual bool lwpp::GlobalBase< LWMTUtilFuncs >::available ( ) const
inlinevirtualinherited

Check if the global is available.

bool lwpp::Thread::checkAbort ( void  )
inlineprotected

This function allows the current or identified thread to check for an abort signal from the main group.

If this function returns a true value (!0), the thread should finish up (release resources, close files, etc.), and gracefully terminate.

void* lwpp::Thread::getData ( )
inlineprotected

Gets the private data storage for the currently running thread.

virtual LWMTUtilFuncs * lwpp::GlobalBase< LWMTUtilFuncs >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

LWMTGroupID lwpp::Thread::getGroupID ( )
inlineprotected

Allows the thread to retrieve the identifier for the group to which it belongs.

LWMTThreadID lwpp::Thread::getID ( void  )
inlineprotected

Returns the identifier of the currently running thread.

int lwpp::Thread::getIndex ( )
inlineprotected

Returns the group index value of the current thread.

static int lwpp::Thread::LWMTThreadFunc ( void *  arg)
inlinestatic
LWMTUtilFuncs * lwpp::GlobalBase< LWMTUtilFuncs >::operator-> ( )
inlineinherited

Get the pointer to the global.

virtual int lwpp::Thread::Run ( )
protectedpure virtual

The actual function to run, to be overriden by the derived class.

void lwpp::Thread::setData ( void *  ptr)
inlineprotected

Sets the private data storage for the currently running thread.

void lwpp::Thread::sleep ( int  delay)
inlineprotected

Causes the thread to "sleep" for a specified number of milliseconds.

In most cases, this causes the thread to release its timeslice, avoiding potential hammering of the CPU(s).


Member Data Documentation

LWMTUtilFuncs * lwpp::GlobalBase< LWMTUtilFuncs >::globPtr
staticprotectedinherited

Pointer to the global functions.


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