The AbstractTracker class is the base of all C++ Celix trackers.
More...
#include <Trackers.h>
|
void | waitIfAble () const |
| Wait (if not on the Celix event thread) for the tracker to be OPEN or CLOSED. More...
|
|
|
template<typename T > |
static std::function< void(T *)> | delCallback () |
|
The AbstractTracker class is the base of all C++ Celix trackers.
It defines how trackers are closed and manages the tracker state.
This class can be used to create a vector of different (shared ptr) trackers (i.e. ServiceTracker, BundleTracker, MetaTracker).
AbstractTracker <--------------------------------— ^ | | | | | GenericServiceTracker BundleTracker MetaTracker ^ | ServiceTracker
- Note
- Thread safe.
◆ AbstractTracker()
celix::AbstractTracker::AbstractTracker |
( |
std::shared_ptr< celix_bundle_context_t > |
_cCtx | ) |
|
|
inlineexplicit |
◆ ~AbstractTracker()
virtual celix::AbstractTracker::~AbstractTracker |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ close()
void celix::AbstractTracker::close |
( |
| ) |
|
|
inline |
Close the tracker (of the state is not CLOSED or CLOSING).
This will be done sync so then the close() method return the tracker is closed and all the needed callbacks have been called.
◆ delCallback()
template<typename T >
static std::function<void(T*)> celix::AbstractTracker::delCallback |
( |
| ) |
|
|
inlinestaticprotected |
◆ getState()
Get the current state of the tracker.
◆ isOpen()
bool celix::AbstractTracker::isOpen |
( |
| ) |
const |
|
inline |
Check if the tracker is open (state == OPEN)
◆ open()
virtual void celix::AbstractTracker::open |
( |
| ) |
|
|
pure virtual |
◆ wait()
void celix::AbstractTracker::wait |
( |
| ) |
const |
|
inline |
Wait until a service tracker is completely OPEN or CLOSED.
This method cannot be called on the Celix event thread.
◆ waitIfAble()
void celix::AbstractTracker::waitIfAble |
( |
| ) |
const |
|
inlineprotected |
Wait (if not on the Celix event thread) for the tracker to be OPEN or CLOSED.
◆ cCtx
const std::shared_ptr<celix_bundle_context_t> celix::AbstractTracker::cCtx |
|
protected |
◆ mutex
std::mutex celix::AbstractTracker::mutex {} |
|
mutableprotected |
◆ state
◆ trkId
long celix::AbstractTracker::trkId {-1L} |
|
protected |
The documentation for this class was generated from the following file: