Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

Volatile Class Template Reference

#include <coherence/lang/Volatile.hpp>

List of all members.


Detailed Description

template<class T>
class coherence::lang::Volatile< T >

Template class wraps primitive data types with memory barriers, providing JSR-133 style volatiles.

Note: In the rare case that a Volatile is declared via the mutable keyword, the Volatile must be informed of this fact by setting fMutable to true during construction.

Author:
mf 2008.02.07
 

Public Types

typedef T Type
 A primitive data type that is wrapped by this Volatile<T>.

Public Member Functions

 Volatile (Object &oGuardian)
 Construct a new Volatile<T> with the default wrapped T value.
 Volatile (Object &oGuardian, const Volatile &o)
 Copy-construct a Volatile<T>.
 Volatile (Object &oGuardian, const Volatile &o, bool fMutable)
 Copy-construct a Volatile<T>.
 Volatile (Object &oGuardian, const T &value)
 Construct a new Volatile<T> with the specified wrapped T value.
 Volatile (Object &oGuardian, const T &value, bool fMutable)
 Construct a new Volatile<T> with the specified wrapped T value.
 ~Volatile ()
 Destruct this Volatile<T> object.
Volatileoperator= (const Volatile &value)
 Assign this Volatile the value from another Volatile.
Volatileoperator= (const T &value)
 Assign this Volatile a new value.
 operator const T () const
 Return the Volatile value.

Constructor & Destructor Documentation

Volatile ( Object oGuardian  )   

Construct a new Volatile<T> with the default wrapped T value.

Parameters:
 oGuardian the object which this data member is part of

Volatile ( Object oGuardian,
    const Volatile< T > &  o 
  )    

Copy-construct a Volatile<T>.

Parameters:
 oGuardian the object which this data member is part of

Volatile ( Object oGuardian,
    const Volatile< T > &  o,
    bool  fMutable 
  )    

Copy-construct a Volatile<T>.

Parameters:
 oGuardian the object which this data member is part of
 fMutable true if the member is declared as mutable, false if declared as const

Volatile ( Object oGuardian,
    const T &  value 
  )    

Construct a new Volatile<T> with the specified wrapped T value.

Parameters:
 oGuardian the object which this data member is part of

Volatile ( Object oGuardian,
    const T &  value,
    bool  fMutable 
  )    

Construct a new Volatile<T> with the specified wrapped T value.

Parameters:
 oGuardian the object which this data member is part of
 fMutable true if the member is declared as mutable, false if declared as const


Member Function Documentation

operator const T (  )  const

Return the Volatile value.

Returns:
The Volatile value


The documentation for this class was generated from the following file:
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.