MemberView Class Template Reference

#include <coherence/lang/MemberView.hpp>

Inherits SmartMember.

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.

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 (Object &oParent)
 Construct a new MemberView referencing NULL via a handle.
template<class DT>
 MemberView (Object &oParent, const TypedHandle< DT > &h)
 Construct a new MemberView refrencing specified Object via a View.
template<class DT>
 MemberView (Object &oParent, const TypedHolder< DT > &th)
 Construct a new MemberView refrencing the same Object as the specified TypedHolder.
template<class DT>
 MemberView (Object &oParent, const MemberHolder< DT > &mh)
 Construct a new MemberView refrencing the same Object as the specified MemberHolder.
template<class DT>
 MemberView (Object &oParent, const MemberView< DT > &that)
 Construct a new MemberView refrencing the same Object as the specified MemberView.
template<class DT>
 MemberView (Object &oParent, const MemberHandle< DT > &that)
 Construct a new MemberView refrencing the same Object as the specified MemberView.
 ~MemberView ()
 Destroy the MemberView.
MemberViewoperator= (const MemberView &that)
 Assign this MemberView to refrence the same Object as the specified MemberView.
template<class DT>
MemberViewoperator= (const MemberView< DT > &mv)
 Assign this MemberView to refrence the same Object as the specified MemberView.
template<class DT>
MemberViewoperator= (const TypedHolder< DT > &th)
 Assign this MemberView to refrence the same Object as the specified MemberView.
template<class DT>
MemberViewoperator= (const MemberHolder< DT > &mh)
 Assign this MemberView to refrence the same Object as the specified MemberHolder.
template<class DT>
MemberViewoperator= (const MemberHandle< DT > &mh)
 Assign this MemberView to refrence the same Object as the specified MemberHandle.
template<class DT>
MemberViewoperator= (const TypedHandle< DT > &h)
 Assign this MemberView to refrence the same Object (and in the same manner) as the specified MemberView.
MemberViewoperator= (const T *cp)
 Assign this MemberView to refrence the same Object (and in the same manner) as the specified pointer.
 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
 Derefrence the MemberView.
template<class AT>
bool operator== (const MemberView< AT > &mv) const
 Compare the supplied MemberView to this MemberView.
template<class AT>
bool operator!= (const MemberView< AT > &mv) const
 Compare the supplied MemberView to this view.
template<class AT>
bool operator== (const MemberHolder< AT > &mh) const
 Compare the supplied MemberHolder to this MemberView.
template<class AT>
bool operator!= (const MemberHolder< AT > &mh) const
 Compare the supplied MemberHolder to this MemberView.
template<class AT>
bool operator== (const MemberHandle< AT > &mh) const
 Compare the supplied MemberHandle to this MemberView.
template<class AT>
bool operator!= (const MemberHandle< AT > &mh) const
 Compare the supplied MemberHandle to this MemberView.
template<class AT>
bool operator== (const TypedHolder< AT > &th) const
 Compare the supplied holder to this view.
template<class AT>
bool operator!= (const TypedHolder< AT > &th) const
 Compare the supplied holder to this view.
template<class AT>
bool operator== (const TypedHandle< AT > &h) const
 Compare the supplied handle to this view.
template<class AT>
bool operator!= (const TypedHandle< AT > &h) const
 Compare the supplied handle to this view.
bool operator== (const Object *cpThat) const
 Compare the supplied pointer to this view.
bool operator!= (const Object *cpThat) const
 Compare the supplied pointer to this view.

Protected Member Functions

void set (ValueView v, SynchronizedMemberWriteBlock *pSync=NULL)
 Set the view to reference an Object via a View.
ValueView get (SynchronizedMemberReadBlock *pSync=NULL) const
 Return a View to the referenced Object.

Constructor & Destructor Documentation

MemberView ( Object oParent  )  [inline]

Construct a new MemberView referencing NULL via a handle.

Parameters:
oParent the self() on the object this data member is a member of

MemberView ( Object oParent,
const TypedHandle< DT > &  h 
) [inline]

Construct a new MemberView refrencing specified Object via a View.

Parameters:
oParent the self() on the object this data member is a member of
h a handle to the Object to reference

MemberView ( Object oParent,
const TypedHolder< DT > &  th 
) [inline]

Construct a new MemberView refrencing the same Object as the specified TypedHolder.

Parameters:
oParent the self() on the object this data member is a member of
th the TypedHolder to initialize from

MemberView ( Object oParent,
const MemberHolder< DT > &  mh 
) [inline]

Construct a new MemberView refrencing the same Object as the specified MemberHolder.

Parameters:
oParent the self() on the object this data member is a member of
mh the MemberHolder to initialize from

MemberView ( Object oParent,
const MemberView< DT > &  that 
) [inline]

Construct a new MemberView refrencing the same Object as the specified MemberView.

Parameters:
oParent the self() on the object this data member is a member of
that the MemberView to initialize from

MemberView ( Object oParent,
const MemberHandle< DT > &  that 
) [inline]

Construct a new MemberView refrencing the same Object as the specified MemberView.

Parameters:
oParent the self() on the object this data member is a member of
that the MemberView to initialize from


Member Function Documentation

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

Assign this MemberView to refrence the same Object as the specified MemberView.

Parameters:
that the MemberView to assign from
Returns:
a reference to this MemberView

MemberView& operator= ( const MemberView< DT > &  mv  )  [inline]

Assign this MemberView to refrence the same Object as the specified MemberView.

Parameters:
mv the MemberView to assign from
Returns:
a reference to this MemberView

MemberView& operator= ( const TypedHolder< DT > &  th  )  [inline]

Assign this MemberView to refrence the same Object as the specified MemberView.

Parameters:
th the TypedHolder to assign from
Returns:
a reference to this MemberView

MemberView& operator= ( const MemberHolder< DT > &  mh  )  [inline]

Assign this MemberView to refrence the same Object as the specified MemberHolder.

Parameters:
mh the MemberHolder to assign from
Returns:
a reference to this MemberView

MemberView& operator= ( const MemberHandle< DT > &  mh  )  [inline]

Assign this MemberView to refrence the same Object as the specified MemberHandle.

Parameters:
mh the MemberHandle to assign from
Returns:
a reference to this MemberView

MemberView& operator= ( const TypedHandle< DT > &  h  )  [inline]

Assign this MemberView to refrence the same Object (and in the same manner) as the specified MemberView.

Parameters:
h the TypedHandle to assign from
Returns:
a reference to this MemberView

MemberView& operator= ( const T *  cp  )  [inline]

Assign this MemberView to refrence the same Object (and in the same manner) as the specified pointer.

Parameters:
cp the pointer to assign from
Returns:
a reference to this MemberView

operator ValueView (  )  const [inline]

Return a View to the referenced Object.

Returns:
a View to the referenced Object

o (  )  const [inline]

Return a View to the referenced Object.

Returns:
a View to the referenced Object

o (  )  const [inline]

Return a TypedHolder to the referenced Object.

Returns:
a TypedHolder to the referenced Object

ValueView operator-> (  )  const [inline]

Derefrence the MemberView.

Returns:
a const pointer to the referenced Object

bool operator== ( const MemberView< AT > &  mv  )  const [inline]

Compare the supplied MemberView to this MemberView.

Parameters:
mv the MemberView to compare against
Returns:
true iff the same object is referenced

bool operator!= ( const MemberView< AT > &  mv  )  const [inline]

Compare the supplied MemberView to this view.

Parameters:
mv the holder to compare against
Returns:
true iff different objects are referenced

bool operator== ( const MemberHolder< AT > &  mh  )  const [inline]

Compare the supplied MemberHolder to this MemberView.

Parameters:
mh the MemberHolder to compare against
Returns:
true iff the same object is referenced

bool operator!= ( const MemberHolder< AT > &  mh  )  const [inline]

Compare the supplied MemberHolder to this MemberView.

Parameters:
mh the holder to compare against
Returns:
true iff different objects are referenced

bool operator== ( const MemberHandle< AT > &  mh  )  const [inline]

Compare the supplied MemberHandle to this MemberView.

Parameters:
mh the MemberHandle to compare against
Returns:
true iff the same object is referenced

bool operator!= ( const MemberHandle< AT > &  mh  )  const [inline]

Compare the supplied MemberHandle to this MemberView.

Parameters:
mh the handle to compare against
Returns:
true iff different objects are referenced

bool operator== ( const TypedHolder< AT > &  th  )  const [inline]

Compare the supplied holder to this view.

Parameters:
th the holder to compare against
Returns:
true iff the same object is referenced

bool operator!= ( const TypedHolder< AT > &  th  )  const [inline]

Compare the supplied holder to this view.

Parameters:
th the holder to compare against
Returns:
true iff different objects are referenced

bool operator== ( const TypedHandle< AT > &  h  )  const [inline]

Compare the supplied handle to this view.

Parameters:
h the handle to compare against
Returns:
true iff the same object is referenced

bool operator!= ( const TypedHandle< AT > &  h  )  const [inline]

Compare the supplied handle to this view.

Parameters:
h the handle to compare against
Returns:
true iff the different objects are referenced

bool operator== ( const Object cpThat  )  const [inline]

Compare the supplied pointer to this view.

Parameters:
cpThat the pointer to compare against
Returns:
true iff the same object is referenced

bool operator!= ( const Object cpThat  )  const [inline]

Compare the supplied pointer to this view.

Parameters:
cpThat the pointer to compare against
Returns:
true iff different objects are referenced

void set ( ValueView  v,
SynchronizedMemberWriteBlock pSync = NULL 
) [inline, protected]

Set the view to reference an Object via a View.

Parameters:
v the View to 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


The documentation for this class was generated from the following file: Copyright (c) 2000-2008 Oracle. All rights reserved.