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

E26041-01

MemberView Class Template Reference

#include <coherence/lang/MemberView.hpp>

Inherits SmartMember.

Inherited by FinalView.

List of all members.


Detailed Description

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

MemberView is a thread-safe view intended for use as a data-member within Objects.

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

Author:
mf 2008.01.09
See also:
MemberHandle

MemberHolder


Public Types

typedef T ValueType
 The type of the values the holder can reference.
typedef T::View ValueView
 The View type for the referenced Object.
typedef ValueView GetType
 Result type for a non-const get operation.

Public Member Functions

 MemberView (const Object &oGuardian)
 Construct a new MemberView referencing NULL via a handle.
 MemberView (const Object &oGuardian, const ValueView &that)
 Construct a new MemberView referencing specified Object.
 MemberView (const Object &oGuardian, const ValueView &that, bool fMutable)
 Construct a new MemberView referencing specified Object.
 ~MemberView ()
 Destroy the MemberView.
MemberViewoperator= (const ValueView &that)
 Assign the MemberView to reference another object.
MemberViewoperator= (const MemberView &that)
 Assign the MemberView to reference another object.
 operator ValueView () const
 Return a View to the referenced Object.
template<class PT>
 o () const
 Return a View to the referenced Object.
template<class PT>
 o () const
 Return a TypedHolder to the referenced Object.
ValueView operator-> () const
 Dereference the MemberView.
const T & operator * () const
 Dereference this handle, returning T&.

Protected Member Functions

virtual void onEscape (bool fEscaped) const
 Event called when the guarding Object's escape state changes.

Derived implementations of this method should include a delegation call to their super class onEscape() method, after they've done their own processing of the event.

Parameters:
fEscaped true if the object is being escaped, false if the object is being captured

virtual size64_t retained () const
 Return the deep byte size of any managed objects held by this SmartMember.
void set (const TypedHolder< T > &that, SynchronizedMemberWriteBlock *pSync=NULL)
 Set the view to reference an Object via a View.
void setEscaped (const TypedHolder< T > &that, SynchronizedMemberWriteBlock *pSync=NULL)
 Set the escaped view to reference an Object via a View.
ValueView get (SynchronizedMemberReadBlock *pSync=NULL) const
 Return a View to the referenced Object.
ValueView getEscaped (SynchronizedMemberReadBlock *pSync=NULL) const
 Return a View to the referenced Object.
void performAction (Action nAction) const
 Perform the specified action.

Protected Attributes

const T * m_cpo
 The referenced Object.

Constructor & Destructor Documentation

MemberView ( const Object oGuardian  )  [inline]

Construct a new MemberView referencing NULL via a handle.

Parameters:
oGuardian the object that protects this member

MemberView ( const Object oGuardian,
const ValueView that 
) [inline]

Construct a new MemberView referencing specified Object.

Parameters:
oGuardian the object that protects this member
that the object to reference

MemberView ( const Object oGuardian,
const ValueView that,
bool  fMutable 
) [inline]

Construct a new MemberView referencing specified Object.

Parameters:
oGuardian the object that protects this member
that the object to reference
fMutable true if the object was declared as mutable


Member Function Documentation

MemberView& operator= ( const ValueView that  )  [inline]

Assign the MemberView to reference another object.

Parameters:
that the object to reference
Returns:
a reference to this MemberView

MemberView& operator= ( const MemberView< T > &  that  )  [inline]

Assign the MemberView to reference another object.

Parameters:
that the object to reference
Returns:
a reference to this MemberView

operator ValueView (  )  const [inline]

Return a View to the referenced Object.

Returns:
a View to the referenced Object

Reimplemented in FinalView, FinalView< coherence::util::filter::IndexAwareFilter >, FinalView< coherence::util::TypedCollections::TypedMap::EntryConverter >, FinalView< coherence::io::AbstractOctetArrayReadBuffer >, FinalView< coherence::io::pof::RawDate >, FinalView< coherence::security::IdentityTransformer >, FinalView< coherence::util::Set >, FinalView< coherence::util::List >, FinalView< coherence::util::ValueManipulator >, FinalView< coherence::util::MapEvent >, FinalView< coherence::util::Converter >, FinalView< coherence::io::pof::PofContext >, FinalView< coherence::lang::String >, FinalView< coherence::util::Binary >, FinalView< coherence::lang::Array >, FinalView< coherence::io::pof::RawTime >, FinalView< coherence::lang::Class >, FinalView< coherence::net::cache::CacheEvent >, FinalView< coherence::util::Comparator >, FinalView< coherence::net::OperationalContext >, FinalView< coherence::util::ValueUpdater >, FinalView< coherence::util::InvocableMap::EntryProcessor >, FinalView< coherence::util::Filter >, FinalView< coherence::lang::Number >, FinalView< coherence::lang::Array< int32_t > >, FinalView< coherence::io::AbstractReadBuffer >, FinalView< coherence::util::ConverterCollections::EntryConverter >, FinalView< coherence::util::MapEventTransformer >, FinalView< coherence::security::IdentityAsserter >, FinalView< coherence::io::pof::reflect::PofNavigator >, FinalView< coherence::run::xml::XmlElement >, FinalView< coherence::net::Member >, FinalView< coherence::lang::Object >, FinalView< coherence::util::ValueExtractor >, FinalView< coherence::lang::Array< octet_t > >, FinalView< coherence::util::Map >, and FinalView< coherence::lang::Exception >.

o (  )  const [inline]

Return a View to the referenced Object.

Returns:
a View to the referenced Object

Reimplemented in FinalView, FinalView, FinalView< coherence::util::filter::IndexAwareFilter >, FinalView< coherence::util::filter::IndexAwareFilter >, FinalView< coherence::util::TypedCollections::TypedMap::EntryConverter >, FinalView< coherence::util::TypedCollections::TypedMap::EntryConverter >, FinalView< coherence::io::AbstractOctetArrayReadBuffer >, FinalView< coherence::io::AbstractOctetArrayReadBuffer >, FinalView< coherence::io::pof::RawDate >, FinalView< coherence::io::pof::RawDate >, FinalView< coherence::security::IdentityTransformer >, FinalView< coherence::security::IdentityTransformer >, FinalView< coherence::util::Set >, FinalView< coherence::util::Set >, FinalView< coherence::util::List >, FinalView< coherence::util::List >, FinalView< coherence::util::ValueManipulator >, FinalView< coherence::util::ValueManipulator >, FinalView< coherence::util::MapEvent >, FinalView< coherence::util::MapEvent >, FinalView< coherence::util::Converter >, FinalView< coherence::util::Converter >, FinalView< coherence::io::pof::PofContext >, FinalView< coherence::io::pof::PofContext >, FinalView< coherence::lang::String >, FinalView< coherence::lang::String >, FinalView< coherence::util::Binary >, FinalView< coherence::util::Binary >, FinalView< coherence::lang::Array >, FinalView< coherence::lang::Array >, FinalView< coherence::io::pof::RawTime >, FinalView< coherence::io::pof::RawTime >, FinalView< coherence::lang::Class >, FinalView< coherence::lang::Class >, FinalView< coherence::net::cache::CacheEvent >, FinalView< coherence::net::cache::CacheEvent >, FinalView< coherence::util::Comparator >, FinalView< coherence::util::Comparator >, FinalView< coherence::net::OperationalContext >, FinalView< coherence::net::OperationalContext >, FinalView< coherence::util::ValueUpdater >, FinalView< coherence::util::ValueUpdater >, FinalView< coherence::util::InvocableMap::EntryProcessor >, FinalView< coherence::util::InvocableMap::EntryProcessor >, FinalView< coherence::util::Filter >, FinalView< coherence::util::Filter >, FinalView< coherence::lang::Number >, FinalView< coherence::lang::Number >, FinalView< coherence::lang::Array< int32_t > >, FinalView< coherence::lang::Array< int32_t > >, FinalView< coherence::io::AbstractReadBuffer >, FinalView< coherence::io::AbstractReadBuffer >, FinalView< coherence::util::ConverterCollections::EntryConverter >, FinalView< coherence::util::ConverterCollections::EntryConverter >, FinalView< coherence::util::MapEventTransformer >, FinalView< coherence::util::MapEventTransformer >, FinalView< coherence::security::IdentityAsserter >, FinalView< coherence::security::IdentityAsserter >, FinalView< coherence::io::pof::reflect::PofNavigator >, FinalView< coherence::io::pof::reflect::PofNavigator >, FinalView< coherence::run::xml::XmlElement >, FinalView< coherence::run::xml::XmlElement >, FinalView< coherence::net::Member >, FinalView< coherence::net::Member >, FinalView< coherence::lang::Object >, FinalView< coherence::lang::Object >, FinalView< coherence::util::ValueExtractor >, FinalView< coherence::util::ValueExtractor >, FinalView< coherence::lang::Array< octet_t > >, FinalView< coherence::lang::Array< octet_t > >, FinalView< coherence::util::Map >, FinalView< coherence::util::Map >, FinalView< coherence::lang::Exception >, and FinalView< coherence::lang::Exception >.

o (  )  const [inline]

Return a TypedHolder to the referenced Object.

Returns:
a TypedHolder to the referenced Object

Reimplemented in FinalView, FinalView, FinalView< coherence::util::filter::IndexAwareFilter >, FinalView< coherence::util::filter::IndexAwareFilter >, FinalView< coherence::util::TypedCollections::TypedMap::EntryConverter >, FinalView< coherence::util::TypedCollections::TypedMap::EntryConverter >, FinalView< coherence::io::AbstractOctetArrayReadBuffer >, FinalView< coherence::io::AbstractOctetArrayReadBuffer >, FinalView< coherence::io::pof::RawDate >, FinalView< coherence::io::pof::RawDate >, FinalView< coherence::security::IdentityTransformer >, FinalView< coherence::security::IdentityTransformer >, FinalView< coherence::util::Set >, FinalView< coherence::util::Set >, FinalView< coherence::util::List >, FinalView< coherence::util::List >, FinalView< coherence::util::ValueManipulator >, FinalView< coherence::util::ValueManipulator >, FinalView< coherence::util::MapEvent >, FinalView< coherence::util::MapEvent >, FinalView< coherence::util::Converter >, FinalView< coherence::util::Converter >, FinalView< coherence::io::pof::PofContext >, FinalView< coherence::io::pof::PofContext >, FinalView< coherence::lang::String >, FinalView< coherence::lang::String >, FinalView< coherence::util::Binary >, FinalView< coherence::util::Binary >, FinalView< coherence::lang::Array >, FinalView< coherence::lang::Array >, FinalView< coherence::io::pof::RawTime >, FinalView< coherence::io::pof::RawTime >, FinalView< coherence::lang::Class >, FinalView< coherence::lang::Class >, FinalView< coherence::net::cache::CacheEvent >, FinalView< coherence::net::cache::CacheEvent >, FinalView< coherence::util::Comparator >, FinalView< coherence::util::Comparator >, FinalView< coherence::net::OperationalContext >, FinalView< coherence::net::OperationalContext >, FinalView< coherence::util::ValueUpdater >, FinalView< coherence::util::ValueUpdater >, FinalView< coherence::util::InvocableMap::EntryProcessor >, FinalView< coherence::util::InvocableMap::EntryProcessor >, FinalView< coherence::util::Filter >, FinalView< coherence::util::Filter >, FinalView< coherence::lang::Number >, FinalView< coherence::lang::Number >, FinalView< coherence::lang::Array< int32_t > >, FinalView< coherence::lang::Array< int32_t > >, FinalView< coherence::io::AbstractReadBuffer >, FinalView< coherence::io::AbstractReadBuffer >, FinalView< coherence::util::ConverterCollections::EntryConverter >, FinalView< coherence::util::ConverterCollections::EntryConverter >, FinalView< coherence::util::MapEventTransformer >, FinalView< coherence::util::MapEventTransformer >, FinalView< coherence::security::IdentityAsserter >, FinalView< coherence::security::IdentityAsserter >, FinalView< coherence::io::pof::reflect::PofNavigator >, FinalView< coherence::io::pof::reflect::PofNavigator >, FinalView< coherence::run::xml::XmlElement >, FinalView< coherence::run::xml::XmlElement >, FinalView< coherence::net::Member >, FinalView< coherence::net::Member >, FinalView< coherence::lang::Object >, FinalView< coherence::lang::Object >, FinalView< coherence::util::ValueExtractor >, FinalView< coherence::util::ValueExtractor >, FinalView< coherence::lang::Array< octet_t > >, FinalView< coherence::lang::Array< octet_t > >, FinalView< coherence::util::Map >, FinalView< coherence::util::Map >, FinalView< coherence::lang::Exception >, and FinalView< coherence::lang::Exception >.

ValueView operator-> (  )  const [inline]

Dereference the MemberView.

Returns:
a const pointer to the referenced Object

Reimplemented in FinalView, FinalView< coherence::util::filter::IndexAwareFilter >, FinalView< coherence::util::TypedCollections::TypedMap::EntryConverter >, FinalView< coherence::io::AbstractOctetArrayReadBuffer >, FinalView< coherence::io::pof::RawDate >, FinalView< coherence::security::IdentityTransformer >, FinalView< coherence::util::Set >, FinalView< coherence::util::List >, FinalView< coherence::util::ValueManipulator >, FinalView< coherence::util::MapEvent >, FinalView< coherence::util::Converter >, FinalView< coherence::io::pof::PofContext >, FinalView< coherence::lang::String >, FinalView< coherence::util::Binary >, FinalView< coherence::lang::Array >, FinalView< coherence::io::pof::RawTime >, FinalView< coherence::lang::Class >, FinalView< coherence::net::cache::CacheEvent >, FinalView< coherence::util::Comparator >, FinalView< coherence::net::OperationalContext >, FinalView< coherence::util::ValueUpdater >, FinalView< coherence::util::InvocableMap::EntryProcessor >, FinalView< coherence::util::Filter >, FinalView< coherence::lang::Number >, FinalView< coherence::lang::Array< int32_t > >, FinalView< coherence::io::AbstractReadBuffer >, FinalView< coherence::util::ConverterCollections::EntryConverter >, FinalView< coherence::util::MapEventTransformer >, FinalView< coherence::security::IdentityAsserter >, FinalView< coherence::io::pof::reflect::PofNavigator >, FinalView< coherence::run::xml::XmlElement >, FinalView< coherence::net::Member >, FinalView< coherence::lang::Object >, FinalView< coherence::util::ValueExtractor >, FinalView< coherence::lang::Array< octet_t > >, FinalView< coherence::util::Map >, and FinalView< coherence::lang::Exception >.

const T& operator * (  )  const [inline]

Dereference this handle, returning T&.

Returns:
a raw T& reference to the referenced Object
Exceptions:
NullPointerException if the this handle is NULL

void set ( const TypedHolder< T > &  that,
SynchronizedMemberWriteBlock pSync = NULL 
) [inline, protected]

Set the view to reference an Object via a View.

Parameters:
that the Object to reference
pSync optional external SyncornizedMemberWriteBlock to use to avoid internal synchronization.

void setEscaped ( const TypedHolder< T > &  that,
SynchronizedMemberWriteBlock pSync = NULL 
) [inline, protected]

Set the escaped view to reference an Object via a View.

Parameters:
that the Object to reference
pSync optional external SyncornizedMemberWriteBlock to use to avoid internal synchronization.

ValueView get ( SynchronizedMemberReadBlock pSync = NULL  )  const [inline, protected]

Return a View to the referenced Object.

Parameters:
pSync optional external SyncornizedMemberReadBlock to use to avoid internal synchronization.
Returns:
a View to the referenced Object

ValueView getEscaped ( SynchronizedMemberReadBlock pSync = NULL  )  const [inline, protected]

Return a View to the referenced Object.

Parameters:
pSync optional external SyncornizedMemberReadBlock to use to avoid internal synchronization.
Returns:
a View to the referenced Object

void performAction ( Action  nAction  )  const [inline, protected]

Perform the specified action.

Parameters:
nAction the action to perform


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