This class follows the Adaptor pattern and is used to provide External Polymorphism by deriving from ACE_Caching_Strategy. More...
#include <Caching_Strategies_T.h>


Public Member Functions | |
| ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation=0, bool delete_implementation=false) | |
| Constructor. | |
| ~ACE_Caching_Strategy_Adapter (void) | |
| Destructor. | |
| ATTRIBUTES | attributes (void) |
| Accessor method for the timer attributes. | |
| double | purge_percent (void) |
| Get the percentage of entries to purge. | |
| void | purge_percent (double percentage) |
| Set the percentage of entries to purge. | |
| int | notify_bind (int result, const ATTRIBUTES &attr) |
| int | notify_find (int result, ATTRIBUTES &attr) |
| int | notify_unbind (int result, const ATTRIBUTES &attr) |
| int | notify_trybind (int result, ATTRIBUTES &attr) |
| int | notify_rebind (int result, const ATTRIBUTES &attr) |
| IMPLEMENTATION & | implementation (void) |
| Accessor to the implementation. | |
| CACHING_UTILITY & | caching_utility (void) |
| Purge the cache. | |
| void | dump (void) const |
| Dumps the state of the object. | |
Private Attributes | |
| IMPLEMENTATION * | implementation_ |
| Implementation class. | |
| bool | delete_implementation_ |
| Do we need to delete the implementation? | |
This class follows the Adaptor pattern and is used to provide External Polymorphism by deriving from ACE_Caching_Strategy.
This class simply delegates all requests to the IMPLEMNETATION object within. This class should be passed in place of the the abstract base ACE_Caching_Strategy class as part of the External Polymorphism pattern.
Definition at line 109 of file Caching_Strategies_T.h.
| ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::ACE_Caching_Strategy_Adapter | ( | IMPLEMENTATION * | implementation = 0, |
|
| bool | delete_implementation = false | |||
| ) | [inline] |
Constructor.
Definition at line 12 of file Caching_Strategies_T.inl.
: implementation_ (implementation), delete_implementation_ (delete_implementation) { if (this->implementation_ == 0) { ACE_NEW (this->implementation_, IMPLEMENTATION); this->delete_implementation_ = true; } }
| ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::~ACE_Caching_Strategy_Adapter | ( | void | ) | [inline] |
Destructor.
Definition at line 26 of file Caching_Strategies_T.inl.
{
if (this->delete_implementation_)
{
delete this->implementation_;
this->delete_implementation_ = false;
this->implementation_ = 0;
}
}
| ATTRIBUTES ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::attributes | ( | void | ) | [inline, virtual] |
Accessor method for the timer attributes.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 37 of file Caching_Strategies_T.inl.
{
return this->implementation_->attributes ();
}
| CACHING_UTILITY & ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::caching_utility | ( | void | ) | [inline, virtual] |
Purge the cache.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 101 of file Caching_Strategies_T.inl.
{
return this->implementation_->caching_utility ();
}
| void ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::dump | ( | void | ) | const [inline, virtual] |
Dumps the state of the object.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 107 of file Caching_Strategies_T.inl.
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Caching_Strategy_Adapter::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
| IMPLEMENTATION & ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation | ( | void | ) | [inline] |
Accessor to the implementation.
Definition at line 95 of file Caching_Strategies_T.inl.
{
return *this->implementation_;
}
| int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_bind | ( | int | result, | |
| const ATTRIBUTES & | attr | |||
| ) | [inline, virtual] |
This method acts as a notification about the CONTAINERs bind method call.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 55 of file Caching_Strategies_T.inl.
{
return this->implementation_->notify_bind (result,
attr);
}
| int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_find | ( | int | result, | |
| ATTRIBUTES & | attr | |||
| ) | [inline, virtual] |
This method acts as a notification about the CONTAINERs find method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 63 of file Caching_Strategies_T.inl.
{
return this->implementation_->notify_find (result,
attr);
}
| int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_rebind | ( | int | result, | |
| const ATTRIBUTES & | attr | |||
| ) | [inline, virtual] |
This method acts as a notification about the CONTAINERs rebind method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 87 of file Caching_Strategies_T.inl.
{
return this->implementation_->notify_rebind (result,
attr);
}
| int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_trybind | ( | int | result, | |
| ATTRIBUTES & | attr | |||
| ) | [inline, virtual] |
This method acts as a notification about the CONTAINERs trybind method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 79 of file Caching_Strategies_T.inl.
{
return this->implementation_->notify_trybind (result,
attr);
}
| int ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::notify_unbind | ( | int | result, | |
| const ATTRIBUTES & | attr | |||
| ) | [inline, virtual] |
This method acts as a notification about the CONTAINERs unbind method call
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 71 of file Caching_Strategies_T.inl.
{
return this->implementation_->notify_unbind (result,
attr);
}
| double ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::purge_percent | ( | void | ) | [inline, virtual] |
Get the percentage of entries to purge.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 43 of file Caching_Strategies_T.inl.
{
return this->implementation_->purge_percent ();
}
| void ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::purge_percent | ( | double | percentage | ) | [inline, virtual] |
Set the percentage of entries to purge.
Implements ACE_Caching_Strategy< ATTRIBUTES, CACHING_UTILITY >.
Definition at line 49 of file Caching_Strategies_T.inl.
{
this->implementation_->purge_percent (percentage);
}
bool ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::delete_implementation_ [private] |
Do we need to delete the implementation?
Definition at line 173 of file Caching_Strategies_T.h.
IMPLEMENTATION* ACE_Caching_Strategy_Adapter< ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION >::implementation_ [private] |
Implementation class.
Definition at line 170 of file Caching_Strategies_T.h.
1.7.0