Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | Friends

maci::ComponentStorage< T, H > Class Template Reference

#include <acsComponentSmartPtr.h>

Inheritance diagram for maci::ComponentStorage< T, H >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T * StoredType
typedef T * PointerType
typedef T & ReferenceType

Public Member Functions

 ComponentStorage ()
 ComponentStorage (const StoredType &p)
 ComponentStorage (const ComponentStorage &rhs)
template<typename U , typename V >
 ComponentStorage (const ComponentStorage< U, V > &)
void setValues (H *h, bool s, const StoredType &p)
PointerType operator-> () const
ReferenceType operator* () const
void Swap (ComponentStorage &rhs)
bool isValid (const ComponentStorage &sp) const
bool isNil () const

Protected Member Functions

void Destroy ()

Static Protected Member Functions

static StoredType Default ()

Private Attributes

H * handle
bool sticky
StoredType pointee_

Friends

PointerType GetImpl (const ComponentStorage &sp)
const StoredTypeGetImplRef (const ComponentStorage &sp)
StoredTypeGetImplRef (ComponentStorage &sp)

Detailed Description

template<class T, class H>
class maci::ComponentStorage< T, H >

Storage Policy class for Component Pointers. In addition to storing the pointer to the component being managed by the smart pointer, this class caches information needed when the component is finally released.


Member Typedef Documentation

template<class T , class H >
typedef T* maci::ComponentStorage< T, H >::PointerType
template<class T , class H >
typedef T& maci::ComponentStorage< T, H >::ReferenceType
template<class T , class H >
typedef T* maci::ComponentStorage< T, H >::StoredType

Constructor & Destructor Documentation

template<class T , class H >
maci::ComponentStorage< T, H >::ComponentStorage (  )  [inline]

Default Constructor

template<class T , class H >
maci::ComponentStorage< T, H >::ComponentStorage ( const StoredType p  )  [inline]

Constructor that stores default management values with a live pointer.

template<class T , class H >
maci::ComponentStorage< T, H >::ComponentStorage ( const ComponentStorage< T, H > &  rhs  )  [inline]

Copy Constructor

template<class T , class H >
template<typename U , typename V >
maci::ComponentStorage< T, H >::ComponentStorage ( const ComponentStorage< U, V > &   )  [inline]

Copy Constructor for ClientStores of other types. We don't allow copying of different types, so the attributes are set to default values.


Member Function Documentation

template<class T , class H >
static StoredType maci::ComponentStorage< T, H >::Default (  )  [inline, static, protected]
template<class T , class H >
void maci::ComponentStorage< T, H >::Destroy (  )  [inline, protected]
template<class T , class H >
bool maci::ComponentStorage< T, H >::isNil (  )  const [inline]

isNil Return true if pointer is a CORBA nil value

References maci::ComponentStorage< T, H >::pointee_.

Referenced by maci::ComponentStorage< T, H >::isValid().

template<class T , class H >
bool maci::ComponentStorage< T, H >::isValid ( const ComponentStorage< T, H > &  sp  )  const [inline]

isValid Return true if handle is a valid pointer

References maci::ComponentStorage< T, H >::handle, and maci::ComponentStorage< T, H >::isNil().

template<class T , class H >
ReferenceType maci::ComponentStorage< T, H >::operator* (  )  const [inline]

Dereference Operator

References maci::ComponentStorage< T, H >::pointee_.

template<class T , class H >
PointerType maci::ComponentStorage< T, H >::operator-> (  )  const [inline]

Member Access Operator

References maci::ComponentStorage< T, H >::pointee_.

template<class T , class H >
void maci::ComponentStorage< T, H >::setValues ( H *  h,
bool  s,
const StoredType p 
) [inline]

SetValues Set the attribute values for the Component being managed. This is a support method for the ComponentSmartPtr constructor.

Parameters:
name is the name of the component that will be managed.
client is a pointer to the SimpleClient that provided the component.
s is flag that indicates if the component is sticky.
p is a pointer to the component that will be managed.

References maci::ComponentStorage< T, H >::handle, maci::ComponentStorage< T, H >::pointee_, and maci::ComponentStorage< T, H >::sticky.

Referenced by maci::ComponentSmartPtr< T, H >::ComponentSmartPtr().

template<class T , class H >
void maci::ComponentStorage< T, H >::Swap ( ComponentStorage< T, H > &  rhs  )  [inline]

Swap Exchange values with another instance of ComponentStorage.

Parameters:
rhs is the instance to exchange attributes with.

References maci::ComponentStorage< T, H >::handle, maci::ComponentStorage< T, H >::pointee_, and maci::ComponentStorage< T, H >::sticky.


Friends And Related Function Documentation

template<class T , class H >
PointerType GetImpl ( const ComponentStorage< T, H > &  sp  )  [friend]

GetImpl. Retrieve the Component pointer from its storage object.

template<class T , class H >
StoredType& GetImplRef ( ComponentStorage< T, H > &  sp  )  [friend]

GetImplRef. Retrieve the Component reference from its storage object.

template<class T , class H >
const StoredType& GetImplRef ( const ComponentStorage< T, H > &  sp  )  [friend]

GetImplRef. Retrieve the Component reference from its storage object.


Member Data Documentation

template<class T , class H >
H* maci::ComponentStorage< T, H >::handle [private]
template<class T , class H >
StoredType maci::ComponentStorage< T, H >::pointee_ [private]
template<class T , class H >
bool maci::ComponentStorage< T, H >::sticky [private]

The documentation for this class was generated from the following file: