ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Utilities.AtomicActivation Class Reference

Thread-safe activation trigger that only activates once. More...

Public Member Functions

 AtomicActivation ()
 Initializes a new instance of the AtomicActivation class in an unactivated state. More...
 
void Reset ()
 Resets the activation state, so that Activate() will return true on then next call. More...
 
bool TryActivate ()
 Returns true if the activation state was previously unactivated. More...
 

Properties

bool IsActivated [get]
 Returns true if the current activation state is activated. More...
 

Detailed Description

Thread-safe activation trigger that only activates once.

In a sense, this is equivalent to extending Interlocked to operate on booleans.

Constructor & Destructor Documentation

Forge.Utilities.AtomicActivation.AtomicActivation ( )

Initializes a new instance of the AtomicActivation class in an unactivated state.

Member Function Documentation

void Forge.Utilities.AtomicActivation.Reset ( )

Resets the activation state, so that Activate() will return true on then next call.

bool Forge.Utilities.AtomicActivation.TryActivate ( )

Returns true if the activation state was previously unactivated.

Returns
True if the activation activated for this call

Property Documentation

bool Forge.Utilities.AtomicActivation.IsActivated
get

Returns true if the current activation state is activated.


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