VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
DtCriticalSection Class Reference

RAII manager object for accessing paralle tick functionality. More...

Inheritance diagram for DtCriticalSection:
Inheritance graph
[legend]

Public Types

typedef
DtParallelTickManager::AccessType 
AccessType
 

Public Member Functions

 DtCriticalSection (DtSimManager *, AccessType initState)
 Construct and set mutex state to initial state. More...
 
 DtCriticalSection (DtSimManager *)
 Construct and do not change mutex state. More...
 
 ~DtCriticalSection ()
 
void reset (AccessType access)
 Change mutex state. More...
 
void unlock ()
 Set mutex state to UNLOCKED. More...
 
void lockShared ()
 Set mutex state to SHARED. More...
 
void lock ()
 Set mutex state to EXCLUSIVE. More...
 
void release ()
 Set mutex state to value it had when this object was created. More...
 
 DtCriticalSection (DtCriticalSection &, AccessType to)
 Construct when there is already another critical section object on the stack. More...
 
 DtCriticalSection (DtCriticalSection &)
 

Protected Member Functions

 DtCriticalSection (DtParallelTickManager *, AccessType to)
 
 DtCriticalSection (DtParallelTickManager *)
 

Protected Attributes

DtParallelTickManagermgr
 
DtParallelTickManager::ThreadLocalInfoinfo
 
AccessType from
 
AccessType to
 

Friends

class DtParallelTickManager
 

Detailed Description

RAII manager object for accessing paralle tick functionality.

This class works similarly to the scoped lock classes that most mutexes use.

This class is used to change the state of the global mutex and guarantee that it is reset to the original value regardless of how the code exits the block where the critical section is defined.

For examples of usage see the parallelTick example.

Member Typedef Documentation

Constructor & Destructor Documentation

DtCriticalSection::DtCriticalSection ( DtSimManager ,
AccessType  initState 
)
explicit

Construct and set mutex state to initial state.

DtCriticalSection::DtCriticalSection ( DtSimManager )
explicit

Construct and do not change mutex state.

DtCriticalSection::DtCriticalSection ( DtCriticalSection ,
AccessType  to 
)
explicit

Construct when there is already another critical section object on the stack.

Note: other constructors will work here but this one may be more efficient.

DtCriticalSection::DtCriticalSection ( DtCriticalSection )
explicit
DtCriticalSection::~DtCriticalSection ( )
DtCriticalSection::DtCriticalSection ( DtParallelTickManager ,
AccessType  to 
)
explicitprotected
DtCriticalSection::DtCriticalSection ( DtParallelTickManager )
explicitprotected

Member Function Documentation

void DtCriticalSection::reset ( AccessType  access)

Change mutex state.

void DtCriticalSection::unlock ( )

Set mutex state to UNLOCKED.

void DtCriticalSection::lockShared ( )

Set mutex state to SHARED.

void DtCriticalSection::lock ( )

Set mutex state to EXCLUSIVE.

void DtCriticalSection::release ( )
inline

Set mutex state to value it had when this object was created.

Friends And Related Function Documentation

friend class DtParallelTickManager
friend

Member Data Documentation

DtParallelTickManager* DtCriticalSection::mgr
protected
DtParallelTickManager::ThreadLocalInfo* DtCriticalSection::info
protected
AccessType DtCriticalSection::from
protected
AccessType DtCriticalSection::to
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)