Oracle Coherence for C++ API
Release 3.6.1.0
E18813-01

- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# 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.
Volatile & | operator= (const Volatile &value)
| Assign this Volatile the value from another Volatile.
Volatile & | operator= (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:

- coherence/lang/Volatile.hpp

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.