#include <acsComponentSmartPtr.h>
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 StoredType & | GetImplRef (const ComponentStorage &sp) |
StoredType & | GetImplRef (ComponentStorage &sp) |
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.
typedef T* maci::ComponentStorage< T, H >::PointerType |
typedef T& maci::ComponentStorage< T, H >::ReferenceType |
typedef T* maci::ComponentStorage< T, H >::StoredType |
maci::ComponentStorage< T, H >::ComponentStorage | ( | ) | [inline] |
Default Constructor
maci::ComponentStorage< T, H >::ComponentStorage | ( | const StoredType & | p | ) | [inline] |
Constructor that stores default management values with a live pointer.
maci::ComponentStorage< T, H >::ComponentStorage | ( | const ComponentStorage< T, H > & | rhs | ) | [inline] |
Copy Constructor
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.
static StoredType maci::ComponentStorage< T, H >::Default | ( | ) | [inline, static, protected] |
void maci::ComponentStorage< T, H >::Destroy | ( | ) | [inline, protected] |
Destroy. Release the component reference managed by this object.
References ACS_LOG, maci::ComponentStorage< T, H >::handle, LM_RUNTIME_CONTEXT, maci::ComponentStorage< T, H >::pointee_, and maci::ComponentStorage< T, H >::sticky.
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().
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().
ReferenceType maci::ComponentStorage< T, H >::operator* | ( | ) | const [inline] |
Dereference Operator
References maci::ComponentStorage< T, H >::pointee_.
PointerType maci::ComponentStorage< T, H >::operator-> | ( | ) | const [inline] |
Member Access Operator
References maci::ComponentStorage< T, H >::pointee_.
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.
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().
void maci::ComponentStorage< T, H >::Swap | ( | ComponentStorage< T, H > & | rhs | ) | [inline] |
Swap Exchange values with another instance of ComponentStorage.
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.
PointerType GetImpl | ( | const ComponentStorage< T, H > & | sp | ) | [friend] |
GetImpl. Retrieve the Component pointer from its storage object.
StoredType& GetImplRef | ( | ComponentStorage< T, H > & | sp | ) | [friend] |
GetImplRef. Retrieve the Component reference from its storage object.
const StoredType& GetImplRef | ( | const ComponentStorage< T, H > & | sp | ) | [friend] |
GetImplRef. Retrieve the Component reference from its storage object.
H* maci::ComponentStorage< T, H >::handle [private] |
StoredType maci::ComponentStorage< T, H >::pointee_ [private] |
bool maci::ComponentStorage< T, H >::sticky [private] |