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 Member Functions | Private Attributes
DtSimComponent::ComponentCriticalSection Class Reference

Scoped guard for use in component tick functions. More...

Public Member Functions

 ComponentCriticalSection (DtSimComponent &, DtParallelTickManager::AccessType)
 Construct and change mutex state. More...
 
 ComponentCriticalSection (ComponentCriticalSection &, DtParallelTickManager::AccessType)
 
 ComponentCriticalSection (DtSimComponent &)
 Constructor. More...
 
 ComponentCriticalSection (ComponentCriticalSection &)
 
void reset (DtParallelTickManager::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...
 

Private Attributes

bool myThreadSafe
 
DtCriticalSection myCriticalSection
 

Detailed Description

Scoped guard for use in component tick functions.

Using this class will guarantee that components which are not marked as thread safe will not change the global access even if they request it.

Constructor & Destructor Documentation

DtSimComponent::ComponentCriticalSection::ComponentCriticalSection ( DtSimComponent ,
DtParallelTickManager::AccessType   
)
explicit

Construct and change mutex state.

DtSimComponent::ComponentCriticalSection::ComponentCriticalSection ( ComponentCriticalSection ,
DtParallelTickManager::AccessType   
)
explicit
DtSimComponent::ComponentCriticalSection::ComponentCriticalSection ( DtSimComponent )
explicit

Constructor.

DtSimComponent::ComponentCriticalSection::ComponentCriticalSection ( ComponentCriticalSection )
explicit

Member Function Documentation

void DtSimComponent::ComponentCriticalSection::reset ( DtParallelTickManager::AccessType  access)

Change mutex state.

void DtSimComponent::ComponentCriticalSection::unlock ( )

Set mutex state to UNLOCKED.

void DtSimComponent::ComponentCriticalSection::lockShared ( )

Set mutex state to SHARED.

void DtSimComponent::ComponentCriticalSection::lock ( )

Set mutex state to EXCLUSIVE.

Member Data Documentation

bool DtSimComponent::ComponentCriticalSection::myThreadSafe
private
DtCriticalSection DtSimComponent::ComponentCriticalSection::myCriticalSection
private

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)