Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

Immutable Class Template Reference

#include <coherence/lang/Immutable.hpp>

Inherits TypedHandle< T >.

List of all members.


Detailed Description

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

A Handle implementation which upon assignment ensures that it will reference an immutable Object.

If the passed Object is immutable (as defined by Object::isImmutable()) then the handle simply holds a const pointer to the Object. If the passed Object is not immutable, then a clone attempt is made, and held via a const pointer. If the supplied Object is not immutable and not cloneable then assignment will fail with a CloneNotSupport exception.

Author:
mf 2007.07.05

Public Member Functions

 Immutable ()
 Construct a NULL handle.
 Immutable (const T *po)
 Construct an Immutable handle to the given Object.
template<class O>
 I (const TypedHandle< O > &that)
 Construct an Immutable handle from another Handle.
 I (const Immutable< T > &that)
 Construct an Immutable handle from another Handle.

Protected Member Functions

Immutable< T > & set (const T *cpo, const ChainedHandleElement *pThat)
 Set this handle to point to immutable version of the given object, or unset the handle.

Constructor & Destructor Documentation

Immutable ( const T *  po  )  [inline]

Construct an Immutable handle to the given Object.

Parameters:
po the pointer to the Object to reference


Member Function Documentation

I ( const TypedHandle< O > &  that  )  [inline]

Construct an Immutable handle from another Handle.

Parameters:
that another handle

I ( const Immutable< T > &  that  )  [inline]

Construct an Immutable handle from another Handle.

Parameters:
that another handle

Immutable<T>& set ( const T *  cpo,
const ChainedHandleElement *  pThat 
) [inline, protected]

Set this handle to point to immutable version of the given object, or unset the handle.

If the given pointer points to the immutable object, then this handle will point it. If the given pointer points to the mutable object, then this handle will point to the clone of that object. If the given pointer is NULL, then this handle will point to no object.

Parameters:
cpo pointer to the target object
pThat pointer to the source ChainedHandleElement


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